If that compression is internal-only, i'd start looking at zstd, which is much better at both speed and compression level
> Optionally, you can hook up a custom compression algorithm. For example, Google Snappy offers even better performance than Brotli for the cost of worse compression ratios. ZSTD by Facebook is also worth checking out.
(...)
> The great news is that support for custom cache compression algorithms has recently been merged into the Rails main branch. But it may take a while before it’s available in a production Rails release.
https://raw.githubusercontent.com/facebook/zstd/v1.3.4/doc/i...