]> git.ipfire.org Git - thirdparty/zstd.git/commit
Add ZSTD_d_maxBlockSize parameter
authorNick Terrell <terrelln@fb.com>
Sat, 15 Apr 2023 00:06:24 +0000 (17:06 -0700)
committerNick Terrell <nickrterrell@gmail.com>
Tue, 18 Apr 2023 05:06:44 +0000 (22:06 -0700)
commit61efb2a047b308b6f0c265e1eae9ca8a062268e4
tree74fa720a1e0d9d395793fed1723a22f157cd98c3
parented313342f1b44196da6bbd4e0c92a4dfc74f3a50
Add ZSTD_d_maxBlockSize parameter

Reduces memory when blocks are guaranteed to be smaller than allowed by
the format. This is useful for streaming compression in conjunction with
ZSTD_c_maxBlockSize.

This PR saves 2 * (formatMaxBlockSize - paramMaxBlockSize) when streaming.
Once it is rebased on top of PR #3616 it will save
3 * (formatMaxBlockSize - paramMaxBlockSize).
lib/decompress/zstd_decompress.c
lib/decompress/zstd_decompress_internal.h
lib/zstd.h
tests/fuzz/simple_round_trip.c
tests/fuzz/stream_round_trip.c
tests/fuzzer.c
tests/zstreamtest.c