3 ms·
Should also add in brotli "br" compression. Chrome and other browsers support it now. https://github.com/google/brotli https://github.com/google/brotli
by ronnier 9y ago
Should also add in brotli "br" compression. Chrome and other browsers support it now.
https://github.com/google/brotli https://github.com/google/brotli
- mozumder 9y agoBrotli takes a lot longer to compress than Zlib. It doesn't remove the requirement for zlib anyways, which means I have to store both Zlib and Brotli fragments in my Redis cache. And Zlib has a nice python interface.
- makmanalp 9y ago> Brotli takes a lot longer to compress than Zlib Only for the default settings, which for brotli is the maximum compression ratio and for nginx isn't, but brotli seems to win in general for comparable compression times or sizes: https://certsimple.com/blog/nginx-brotli https://certsimple.com/blog/nginx-brotli Anyway, compression times don't matter if you're compressing things up ahead. E.g. nginx can serve static files compressed with gzip_static / brotli_static. It's true that you might have to serve both, but disk is cheap and improving latency and response time is hard, so I have no problem with that tradeoff. Or you could just have the zlib encode on the fly for old IE, if space is truly a concern.