From the Cloduflare's tests:
"Most files are smaller than 64KB, and if we look only at those files then Brotli 4 is actually 1.48X slower than zlib level 8!"
And the faster zlib levels (1-7) are even faster! See the table. I especially like zlib 1.
"Most files are smaller than 64KB, and if we look only at those files then Brotli 4 is actually 1.48X slower than zlib level 8!"
And the faster zlib levels (1-7) are even faster! See the table. I especially like zlib 1.
All these can't be compressed more than they already are, forcing any lossless (like zlib and brotli) compressor on them is just the loss of CPU time.
Try and compare.
Compression 101.
$ curl -sS http://www.exiv2.org/include/img_1771.jpg | wc -c
32764
$ curl -sS http://www.exiv2.org/include/img_1771.jpg | gzip -9 | wc -c
31323
In this case, though, it often makes more sense to just remove the EXIF data.PDF files can be even more compressible, at least ones that are text and layout as opposed to embedded images:
$ curl -sS http://www.polyu.edu.hk/iaee/files/pdf-sample.pdf | wc -c
7945
$ curl -sS http://www.polyu.edu.hk/iaee/files/pdf-sample.pdf | gzip -9 | wc -c
4336Those that want to deliver the videos or pictures should use the proper format and not depend on Brotli or zlib.