From: Mark Adler Date: Mon, 2 Jan 2017 04:02:24 +0000 (-0800) Subject: Minor edits and clarifications of comments. X-Git-Tag: 1.9.9-b1~706 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4017599aa047683c9ef2f0b87b5f8fba9518bda5;p=thirdparty%2Fzlib-ng.git Minor edits and clarifications of comments. --- diff --git a/zlib.h b/zlib.h index 82e533e3d..ab0b41dd3 100644 --- a/zlib.h +++ b/zlib.h @@ -376,10 +376,11 @@ ZEXTERN int ZEXPORT inflateInit (z_stream *strm); Initializes the internal stream state for decompression. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized before by - the caller. In the current version of inflate, the provide input is not - read or consumed. Any memory allocation will be deferred to the first call - of inflate. If zalloc and zfree are set to NULL, inflateInit updates them to - use default allocation functions. + the caller. In the current version of inflate, the provided input is not + read or consumed. The allocation of a sliding window will be deferred to + the first call of inflate (if the decompression does not complete on the + first call). If zalloc and zfree are set to NULL, inflateInit updates + them to use default allocation functions. inflateInit 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 @@ -405,7 +406,7 @@ ZEXTERN int ZEXPORT inflate(z_stream *strm, int flush); - Decompress more input starting at next_in and update next_in and avail_in accordingly. If not all input can be processed (because there is not - enough room in the output buffer), then next_in and avail_on are updated + enough room in the output buffer), then next_in and avail_in are updated accordingly, and processing will resume at this point for the next call of inflate(). @@ -1195,7 +1196,7 @@ ZEXTERN int ZEXPORT compress(unsigned char *dest, size_t *destLen, const unsigne the byte length of the source buffer. Upon entry, destLen is the total size of the destination buffer, which must be at least the value returned by compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed buffer. compress() is equivalent to compress2() with a level + compressed data. compress() is equivalent to compress2() with a level parameter of Z_DEFAULT_COMPRESSION. compress returns Z_OK if success, Z_MEM_ERROR if there was not @@ -1211,7 +1212,7 @@ ZEXTERN int ZEXPORT compress2(unsigned char *dest, size_t *destLen, const unsign length of the source buffer. Upon entry, destLen is the total size of the destination buffer, which must be at least the value returned by compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed buffer. + compressed data. compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output buffer,