]> git.ipfire.org Git - thirdparty/zstd.git/commit
[lib] Allow ZSTD_CCtx_loadDictionary() to be called before parameters are set 1555/head
authorNick Terrell <terrelln@fb.com>
Thu, 21 Mar 2019 22:17:41 +0000 (15:17 -0700)
committerNick Terrell <terrelln@fb.com>
Thu, 21 Mar 2019 23:13:53 +0000 (16:13 -0700)
commit6b053b9f6098d5f0430186158fb66dfd1f969d09
tree60b60888a7d120368d181850037fd8e4bb2543af
parent20f9ff7e5361916560e95336c89e8dc8564ba230
[lib] Allow ZSTD_CCtx_loadDictionary() to be called before parameters are set

* After loading a dictionary only create the cdict once we've started the
  compression job. This allows the user to pass the dictionary before they
  set other settings, and is in line with the rest of the API.
* Add tests that mix the 3 dictionary loading APIs.
* Add extra tests for `ZSTD_CCtx_loadDictionary()`.
* The first 2 tests added fail before this patch.
* Run the regression test suite.
lib/compress/zstd_compress.c
lib/compress/zstd_compress_internal.h
tests/fuzzer.c