Try Documentalist,
my app that offers fast, offline access to 190+ programmer API docs.
I wanted to see a real-life performance of different compressors for web content:
- gzip is standard gzip compressor at highest compression setting i.e.
gzip -9
- zopfli generates gzip compatible streams but achieves better compression by taking much longer to compress data
- brotli is a new compressor that aims to be comparable in speed to gzip but with better compression
I ran the compressor on a minified JavaScript code from one of my projects.
uncompressed vs. zopfli vs. brotli vs. gzip
Name | size | saved | saved % |
---|---|---|---|
bundle.min.js | 1,163,479 | 0 | 0 |
bundle.min.js.gz | 353,215 | 810,264 | 69.64% |
bundle.min.js.zopfli | 338,177 | 825,302 | 70.93% |
bundle.min.js.brotli | 296,420 | 867,059 | 74.52% |
Relative difference between compressed sizes:
zopfli vs. brotli vs. gzip
Name | size | saved | saved % |
---|---|---|---|
bundle.min.js.gz | 353,215 | 0 | 0 |
bundle.min.js.zopfli | 338,177 | 15,038 | 4.26% |
bundle.min.js.brotli | 296,420 | 56,795 | 16.08% |