4 ms·
> 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 bro
by 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.