1
0
mirror of https://github.com/facebook/zstd.git synced 2025-03-07 01:10:04 +02:00

Z_TREES only with ZLIB_VERNUM >= 0x1240

This commit is contained in:
Przemyslaw Skibinski 2016-11-28 12:46:16 +01:00
parent a641776197
commit edd3e2a834
2 changed files with 7 additions and 2 deletions

View 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

View 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;