5 ms·
Since most of Brotli's improvements over its ancestor LZ77 are due to its large, hardcoded, text-corpus dictionary [1], most of the algorithm's strengths would
by niftich 10y ago
Since most of Brotli's improvements over its ancestor LZ77 are due to its large, hardcoded, text-corpus dictionary [1], most of the algorithm's strengths would be wasted on binary data like images.
Zopfli, from the same people, is a DEFLATE encoder, so it can be used in PNG [2] and this has already been added to some optimizers, e.g. AdvanceCOMP [3]
[1] https://gist.github.com/klauspost/2900d5ba6f9b65d69c8e https://gist.github.com/klauspost/2900d5ba6f9b65d69c8e
[2] https://github.com/google/zopfli/commit/337d27f25ef15a6cf34fef2acd0613fddc411cb1 https://github.com/google/zopfli/commit/337d27f25ef15a6cf34f...
[3] http://www.advancemame.it/doc-advpng.html http://www.advancemame.it/doc-advpng.html
- JyrkiAlakuijala 10y agoAbout 25 % of compression improvements for short files (such as web pages) come from the static dictionary. The rest are format improvements. The relatively small static dictionary does not improve the compression of long files.
- est 10y agoFirst time saw the Brotli dictionary. It has duplicates. Line 3131 and 8704 both are "操作"
- niftich 10y agoInterestingly, there are also 121 different transformations [1] you can apply to each dictionary word, from adding various prefixes and suffixes, trimming letters, and some more complex ones [2]. If the plain-text dictionary linked earlier [3] is accurate, it'd appear that the dictionary contains a lot of redundant forms. [1] https://tools.ietf.org/html/draft-alakuijala-brotli-11#page-27 https://tools.ietf.org/html/draft-alakuijala-brotli-11#page-... [2] https://tools.ietf.org/html/draft-alakuijala-brotli-11#appendix-B https://tools.ietf.org/html/draft-alakuijala-brotli-11#appen... [3] https://gist.github.com/klauspost/2900d5ba6f9b65d69c8e https://gist.github.com/klauspost/2900d5ba6f9b65d69c8e