]> git.ipfire.org Git - thirdparty/zstd.git/commit
[libzstd] Allow compression parameters to be set with a cdict
authorNick Terrell <terrelln@fb.com>
Wed, 13 Mar 2019 22:23:24 +0000 (15:23 -0700)
committerNick Terrell <terrelln@fb.com>
Wed, 13 Mar 2019 23:10:05 +0000 (16:10 -0700)
commit787b76904a82998a7bdd95a40f4e442c98ae6461
treec200ef9b216af507a44a6b5737793156a975311b
parentea3b81f02c70703a016c4b5aeffd1b292d68195a
[libzstd] Allow compression parameters to be set with a cdict

The order you set parameters in the advanced API is not supposed to matter.
However, once you call `ZSTD_CCtx_refCDict()` the compression parameters
cannot be changed. Remove that restriction, and document what parameters
are used when using a CDict.

If the CCtx is in dictionary mode, then the CDict's parameters are used.
If the CCtx is not in dictionary mode, then its requested parameters are
used.
lib/compress/zstd_compress.c
lib/zstd.h
tests/fuzzer.c