Home / Programming / compression / zopfli vs. brotli vs. gzip edit

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.

Namesizesavedsaved %
bundle.min.js1,163,47900
bundle.min.js.gz353,215810,26469.64%
bundle.min.js.zopfli338,177825,30270.93%
bundle.min.js.brotli296,420867,05974.52%

Relative difference between compressed sizes:

Namesizesavedsaved %
bundle.min.js.gz353,21500
bundle.min.js.zopfli338,17715,0384.26%
bundle.min.js.brotli296,42056,79516.08%

Go to index of articles.

Share on