4 ms·
> It's a smaller file to send over the wire, and the smaller the file, the faster the decompression. Can someone elaborate on this? Why do smaller files decomp
by millstone 11y ago
> It's a smaller file to send over the wire, and the smaller the file, the faster the decompression.
Can someone elaborate on this? Why do smaller files decompress faster?
> However, remember that decompression is still the same speed, and totally safe
Wait, what? Didn't we just establish that it's faster to decompress?
- ndesaulniers 11y ago> Why do smaller files decompress faster? The same reason why "no code" is faster than optimized code. ;)
- millstone 11y agoThe trivial identity "compressor" is fastest to decompress, since it requires no work. Likewise PNG has literal blocks, which are longer but faster to decompress. So is it actually true that Zopfli-compressed files decompress faster?
- deleted 11y ago[deleted]
- arjie 11y agoThe first faster refers to total time spent decompressing being lower. The second time speed is mentioned he's saying the rate is the same. With constant rate, smaller loads are completed faster. And the rate is constant but the load is smaller.
- millstone 11y agoDecompression speed is normally measured in bytes per second of output, not input. Since the output is the same, two algorithms that decompress at the same rate take the same time, regardless of compression ratio. Googling finds a benchmark [1] which shows Zopfli decompression rate as intermediate between deflate 1 and deflate 9. On two our of three tests, Zopfli produces smaller files but is slower to decompress than deflate 9. So "the smaller the file, the faster the decompression" isn't correct. [1] PDF: https://cran.r-project.org/web/packages/brotli/vignettes/brotli-2015-09-22.pdf https://cran.r-project.org/web/packages/brotli/vignettes/bro...
- pornel 11y agoYou can think of a compressed file as a program (a set of instructions) executed by an interpreter (the decompressor) that builds the original file. A smaller compressed file is usually going to contain fewer instructions for the decompressor to execute, so there's less work to do to reconstruct the original file.