]> git.ipfire.org Git - thirdparty/zstd.git/commit
Fix ZSTD_estimateCStreamSize_usingCCtxParams()
authorNick Terrell <terrelln@fb.com>
Tue, 2 Apr 2019 00:51:28 +0000 (17:51 -0700)
committerNick Terrell <terrelln@fb.com>
Tue, 2 Apr 2019 01:02:52 +0000 (18:02 -0700)
commit56682a7709b792b826fbb39216044369067e8fa4
treefc5c8c6fef2a9f27534271c583a3ac2a8b6161e6
parent425ce5547c7c49e459a646f1d4bb99341972c193
Fix ZSTD_estimateCStreamSize_usingCCtxParams()

It wasn't using the ZSTD_CCtx_params correctly. It must actualize
the compression parameters by calling ZSTD_getCParamsFromCCtxParams()
to get the real window log.

Tested by updating the streaming memory usage example in the next
commit. The CHECK() failed before this patch, and passes after.

I also added a unit test to zstreamtest.c that failed before this
patch, and passes after.
lib/compress/zstd_compress.c
tests/zstreamtest.c