diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2018-01-08 18:16:05 -0800 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2018-01-08 18:16:05 -0800 |
commit | bf88202e314898f74b42995a71bb67d1bcc51883 (patch) | |
tree | 2eabceb1d6833b04d8201093a57781d56f9cb312 /zlib.h | |
parent | ba9df2111e9c4a95bc48daf402a90873852b10af (diff) | |
download | zlib-bf88202e314898f74b42995a71bb67d1bcc51883.tar.gz |
Emphasize the need to continue decompressing gzip members.
Diffstat (limited to 'zlib.h')
-rw-r--r-- | zlib.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -866,9 +866,11 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, detection, or add 16 to decode only the gzip format (the zlib format will return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see - below), inflate() will not automatically decode concatenated gzip streams. - inflate() will return Z_STREAM_END at the end of the gzip stream. The state - would need to be reset to continue decoding a subsequent gzip stream. + below), inflate() will *not* automatically decode concatenated gzip members. + inflate() will return Z_STREAM_END at the end of the gzip member. The state + would need to be reset to continue decoding a subsequent gzip member. This + *must* be done if there is more data after a gzip member, in order for the + decompression to be compliant with the gzip standard (RFC 1952). inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_VERSION_ERROR if the zlib library version is incompatible with the |