]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
updated description of ZWRAP_setPledgedSrcSize
authorinikep <inikep@gmail.com>
Tue, 27 Sep 2016 13:25:20 +0000 (15:25 +0200)
committerinikep <inikep@gmail.com>
Tue, 27 Sep 2016 13:25:20 +0000 (15:25 +0200)
zlibWrapper/README.md
zlibWrapper/zstd_zlibwrapper.h

index 163009a8ba72babe6394c99ad349679c6ca7ad88..427cdbe0916f8d9dc48b138e215aafbac0d61be8 100644 (file)
@@ -85,7 +85,7 @@ During streaming compression the compressor never knows how big is data to compr
 Zstandard compression can be improved by providing size of source data to the compressor. By default streaming compressor assumes that data is bigger than 256 KB but it can hurt compression speed on smaller data. 
 The zstd wrapper provides the `ZWRAP_setPledgedSrcSize()` function that allows to change a pledged source size for a given compression stream.
 The function will change zstd compression parameters what may improve compression speed and/or ratio.
-It should be called just after `deflateInit()`. The function is only helpful when data is compressed in blocks. There will be no change in case of `deflateInit()` immediately followed by `deflate(strm, Z_FINISH)`
+It should be called just after `deflateInit()`or `deflateReset()` and before `deflate()` or `deflateSetDictionary()`. The function is only helpful when data is compressed in blocks. There will be no change in case of `deflateInit()` or `deflateReset()`  immediately followed by `deflate(strm, Z_FINISH)`
 as this case is automatically detected.
 
 
index 5447b3a91092a5afbbf54401ffc62a92dbdf5a12..6a9cddc22e7eed4a7265da425e1c1a9082b8da79 100644 (file)
@@ -39,8 +39,9 @@ int ZWRAP_isUsingZSTDcompression(void);
 
 /* Changes a pledged source size for a given compression stream.
    It will change ZSTD compression parameters what may improve compression speed and/or ratio.
-   The function should be called just after deflateInit(). It's only helpful when data is compressed in blocks. 
-   There will be no change in case of deflateInit() immediately followed by deflate(strm, Z_FINISH) 
+   The function should be called just after deflateInit() or deflateReset() and before deflate() or deflateSetDictionary().
+   It's only helpful when data is compressed in blocks. 
+   There will be no change in case of deflateInit() or deflateReset() immediately followed by deflate(strm, Z_FINISH) 
    as this case is automatically detected.  */
 int ZWRAP_setPledgedSrcSize(z_streamp strm, unsigned long long pledgedSrcSize);