]> git.ipfire.org Git - thirdparty/zstd.git/commit
[lib] Add ZSTD_c_deterministicRefPrefix 2616/head
authorNick Terrell <terrelln@fb.com>
Wed, 5 May 2021 19:18:47 +0000 (12:18 -0700)
committerNick Terrell <terrelln@fb.com>
Thu, 6 May 2021 01:49:56 +0000 (18:49 -0700)
commit172b4b6ac49b223440fc0e630a25ebcaa7d33d92
tree25a07b5072a551871f3c113c9ae4bb0911bda617
parent2d10544b84d8d1cffaaffb4ad7233cb295d38371
[lib] Add ZSTD_c_deterministicRefPrefix

This flag forces zstd to always load the prefix in ext-dict mode, even
if it happens to be contiguous, to force determinism. It also applies to
dictionaries that are re-processed.

A determinism test case is also added, which fails without
`ZSTD_c_deterministicRefPrefix` and passes with it set.

Question: Should this be the default behavior? It isn't in this PR.
lib/compress/zstd_compress.c
lib/compress/zstd_compress_internal.h
lib/compress/zstdmt_compress.c
lib/zstd.h
tests/fuzz/zstd_helpers.c
tests/fuzzer.c
tests/zstreamtest.c