]> git.ipfire.org Git - thirdparty/zstd.git/commit
improved compression of literals in specific corner cases
authorYann Collet <cyan@fb.com>
Fri, 21 Jan 2022 05:24:33 +0000 (21:24 -0800)
committerYann Collet <cyan@fb.com>
Wed, 26 Jan 2022 22:47:24 +0000 (14:47 -0800)
commit51da2d2ff245be6bcd719ee1f3d4c23225d4e653
treea483c9f6ff09526bd4d172996bfc809a6419bbc3
parent7616e39f3b5618a20d2c8d059f1369283838cbce
improved compression of literals in specific corner cases

In rare cases, the default huffman depth selector is a bit too harsh,
requiring brutal adaptations to the tree,
resulting is some loss of compression ratio.
This new heuristic avoids the worse cases, favoring compression ratio.

As an example, compression of a specific distribution of 771 literals
is now improved to 441 bytes, from 601 bytes before.
lib/compress/huf_compress.c