]> git.ipfire.org Git - thirdparty/zstd.git/commit
fixed: compression ratio discrepancy
authorYann Collet <cyan@fb.com>
Wed, 19 Dec 2018 18:11:06 +0000 (10:11 -0800)
committerYann Collet <cyan@fb.com>
Wed, 19 Dec 2018 18:11:06 +0000 (10:11 -0800)
commit8e0e495ce8aa5e0467e91a8df9fa95bdf41c4dad
tree6608f2d28c77f688cae87ec5af297da9205af5b8
parentd0e15f8d327f72f891d4cae80850e3303f31ddb5
fixed: compression ratio discrepancy

depending on initialization,
the first byte of a new frame was invalidated or not.

As a consequence, one match opportunity was available or not,
resulting in slightly different compressed sizes
(on average, 1 or 2 bytes once every 20 frames).

It impacted ratio comparison between one-shot and streaming modes.

This fix makes the first byte of a new frame always a valid match.
Now compressed size is always the same.
It also improves compressed size by a negligible amount.
lib/compress/zstd_compress.c
lib/compress/zstd_compress_internal.h
lib/compress/zstd_opt.c