]> git.ipfire.org Git - thirdparty/zstd.git/commit
fixed zlib wrapper
authorYann Collet <cyan@fb.com>
Wed, 18 Oct 2017 18:18:27 +0000 (11:18 -0700)
committerYann Collet <cyan@fb.com>
Wed, 18 Oct 2017 18:22:23 +0000 (11:22 -0700)
commitca1a9ebac54b01766373e138833dc39674bad7c3
tree2fb01581dccbc7a165d740ec5c43f36d69b0186c
parent1ff8a8c10957161f462a6f6fe44bc2fce20278c8
fixed zlib wrapper

it was invoking ZSTD_initCStream_advanced() with pledgedSrcSize==0 and contentSizeFlag=1
which means "empty"
while the intention was to mean "unknown".

The contentSizeFlag==1 is new, it is a consequence of setting this value to 1 by default.

The solution selected here is to pass ZSTD_CONTENTSIZE_UNKNOWN to mean "unknown".
So contentSizeFlag remains set (it wasn't in previous versions).
doc/zstd_manual.html
lib/zstd.h
zlibWrapper/zstd_zlibwrapper.c