code.jquery.com/jquery-1.9.1.js
original 268381
gzip 76070 (32KB dictionary, 128 word size)
Zopfli 75730
340 bytes is not worth a 20x time increase for compression.code.jquery.com/jquery-1.9.1.js
original 268381
gzip 76070 (32KB dictionary, 128 word size)
Zopfli 75730
340 bytes is not worth a 20x time increase for compression.PNG seems like a good candidate for this style compression. A constant time initial cost for recurring savings in bytes transmitted seems like an excellent use of CPU time to me.
As an aside, I ran the Zopfli program with 10000 iterations on jquery-1.9.1.js:
268381 jquery-1.9.1.js
75622 jquery-1.9.1.js.gzWish more people understood this aspect of web scale! well said :)
92629 jquery-1.9.1.min.js
32666 (35.26%) gzip -9
31691 (34.22%) zopfli with standard compress
31688 (34.20%) zopfli with max compress 31783 gzip with 32KB dictionary and 128 word size
31764 above with filename stripped
I am too lazy to strip out the filename so there is a few bytes penalty, so it's more like 31764So in this case it's
31688
vs
31764
76 bytesI guess the real question is what is the decode penalty time if any?
bzip2 can get it to 65536 bytes which is a whopping 10k smaller than zopfli
Oh wait, I see that zopfli is deflate compatible so that means browsers can still decode it. Fascinating.
On-demand xz will probably never be worth it however, the encode time just takes too long. You would have physically transferred the data by the time it has finished compressing.