Custom WebSocket extension for Rails ActionCable

In the previous post, we saw how to support compression with permessage-deflate extension for Rails ActionCable connections. Now that we are there, let's go one step further and see how we can create a custom extension for WS frame compression. As an example, I'll demonstrate a way to compress JSON…