by eknkc · 13y ago · 0 comments
Original file: 268381 bytes
Zopfli (with -i1000) 75730 bytes in 950ms
Gzip (with -9) 79388 bytes in 30ms
It's really slow but the difference seems significant enough. (They have more data here: https://zopfli.googlecode.com/files/Data_compression_using_Z...)
For comparison on my machine:
zopfli -i1000 takes [real, sys]=[1069ms, 21ms], 75730 bytes.
xz -9 takes [148ms, 15ms], 69476 bytes.
(Though as mentioned as a pro of zopfli, xz would lose on decompression speed for a larger file.)
If you control the compressor and decompressor then applying new tricks to producing a Deflate stream is far less interesting, just use a better compressor.
I've not used xz, I'm sure it's good, but the point isn't really about which compression algorithm is the best in the world, but which works best in the (depressingly limited) real world conditions.
LZMA compression has gained a lot of traction over the past few years.
32653 gzip -9
31763 7z -tgzip -si -mx=9 -mfb=258 -mpass=16
31691 zopfli -i1000
IOW, it yields a much smaller benefit as data gets harder to compress. Of course this is not at all surprising. time size format
n/a 987640 uncompressed
18.44 210896 gzip
281.44 143128 xz
3604.21 200640 zopfilcode.jquery.com/jquery-1.9.1.js
original 268381
gzip 76070
zopfli 75730
Zopfli only has 340 bytes savings and 20x time increase.Not worth it.