]> git.ipfire.org Git - thirdparty/zstd.git/commit
fix a minor inefficiency in compress_superblock 3668/head
authorYann Collet <cyan@fb.com>
Mon, 5 Jun 2023 16:51:52 +0000 (09:51 -0700)
committerYann Collet <cyan@fb.com>
Mon, 5 Jun 2023 16:51:52 +0000 (09:51 -0700)
commit1f83b7cfc459c2dbef00dc6276f790370e17aef6
tree78e2e5e0c534fbfd5307539f5a92b7a8f3b4a9a9
parent5059618295bc67f4f70eb6f12e6cf57b8d3de141
fix a minor inefficiency in compress_superblock

and in `decodecorpus`:
the specific case `nbSeq=127` can be represented using the 1-byte format.
Note that both the 1-byte and the 2-bytes formats are valid to represent this case,
so there was no "error", produced data remains valid,
it's just that the 1-byte format is more efficient.

fix #3667

Credit to @ip7z for finding this issue.
doc/zstd_compression_format.md
lib/compress/zstd_compress_superblock.c
tests/decodecorpus.c