]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Z_TREES only with ZLIB_VERNUM >= 0x1240
authorPrzemyslaw Skibinski <inikep@gmail.com>
Mon, 28 Nov 2016 11:46:16 +0000 (12:46 +0100)
committerPrzemyslaw Skibinski <inikep@gmail.com>
Mon, 28 Nov 2016 11:46:16 +0000 (12:46 +0100)
zlibWrapper/README.md
zlibWrapper/zstd_zlibwrapper.c

index 5fefac1d32d841b4a8da57ec1fad19223e794735..cbf1b1b30b6dc7cc2baa145be7e2bff0a1d589f9 100644 (file)
@@ -137,12 +137,12 @@ Supported methods:
 - compress2
 - compressBound
 - uncompress
+- gzip file access functions
 
 Ignored methods (they do nothing):
 - deflateParams
 
 Unsupported methods:
-- gzip file access functions
 - deflateCopy
 - deflateTune
 - deflatePending
index 477c53b4138577b0fac82fa2ca29fede13aec832..3b23358f37cffc29d213e58bcd081d2d198aa151 100644 (file)
@@ -321,7 +321,12 @@ ZEXTERN int ZEXPORT z_deflate OF((z_streamp strm, int flush))
         strm->avail_in -= zwc->inBuffer.pos;
     }
 
-    if (flush == Z_FULL_FLUSH || flush == Z_BLOCK || flush == Z_TREES) return ZWRAPC_finishWithErrorMsg(strm, "Z_FULL_FLUSH, Z_BLOCK and Z_TREES are not supported!");
+    if (flush == Z_FULL_FLUSH 
+#if ZLIB_VERNUM >= 0x1240
+        || flush == Z_TREES 
+#endif
+        || flush == Z_BLOCK)
+        return ZWRAPC_finishWithErrorMsg(strm, "Z_FULL_FLUSH, Z_BLOCK and Z_TREES are not supported!");
 
     if (flush == Z_FINISH) {
         size_t bytesLeft;