]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Emphasize the need to continue decompressing gzip members.
authorMark Adler <madler@alumni.caltech.edu>
Tue, 9 Jan 2018 02:16:05 +0000 (18:16 -0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 12 Dec 2018 16:17:49 +0000 (17:17 +0100)
zlib.h

diff --git a/zlib.h b/zlib.h
index 49da9aed37a4440d38983fa4d33b9da3c8a9199d..c7b7bf67adcef0385b70949e6a6eafbd8332217e 100644 (file)
--- a/zlib.h
+++ b/zlib.h
@@ -847,9 +847,11 @@ ZEXTERN int ZEXPORT inflateInit2(z_stream *strm, int  windowBits);
    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