5 ms·
Firefox experimental build with support for LZMA2 compression (2013)
- nextw33k 11y agoWhenever I hear about HTTP compression I always think of Jeff Atwoods blog post: http://blog.codinghorror.com/youre-reading-the-worlds-most-dangerous-programming-blog/ http://blog.codinghorror.com/youre-reading-the-worlds-most-d... Basically DEFLATE beats GZip because its faster at decompressing. Choosing a compression scheme should be about balancing the transmission time with the decompression time, compression time is the least important aspect of the problem since caching can help mitigate that problem. Statements like "This algorithm compresses better than gzip/deflate, at the expense of slower compression. Decompression is much faster than compression." mean nothing because its not telling you if the decompression time on a mobile device is worse than if you had sent it without compression. Plus I'd be surprised if there was any algorithm that was slower to decompress than it is to compress.
- qrmn 11y agoI can't think of many scenarios in which this would be a win which aren't usually compressed archive downloads of some sort anyway, or might be better presented as a torrent with a tree hash and some multisourcing. LZ4 might be a better choice. It compresses moderately well, but the packing and depacking speed are much better. Has anyone investigated whether it's viable? Also don't forget that you need to be careful about compression in a few contexts where attacker-injected data and a secret could share a compression context (the BREACH attack, for example). Compression is usually a good idea, but you should really salt new CSRF tokens every load. HTTP/2's header compression is context-free to mitigate the related CRIME attack.
- jug 11y agoFrom the bug at Bugzilla, I thought Brotli looked even more interesting since it balanced ratio (somewhere in between lzma and gzip) with speeds better than I thought LZMA did, at least with the importance of speed with web servers, and I think using the right tool for the job is a good idea here: https://github.com/google/brotli https://github.com/google/brotli An interesting idea though. With cached lzma files, it would be more of a pure win for lzma, but I wonder what the real world results/use would actually be and how much web hosts would generally enjoy this idea.