Skip to content

Commit

Permalink
Minor edits and clarifications of comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
madler committed Jan 2, 2017
1 parent 7358ef2 commit 52aa550
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions zlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,11 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp 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 Z_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 Z_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
Expand All @@ -408,7 +409,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp 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().
Expand Down Expand Up @@ -1229,7 +1230,7 @@ ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
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
Expand All @@ -1246,7 +1247,7 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
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,
Expand Down

0 comments on commit 52aa550

Please sign in to comment.