Allow deflatePrime() to insert bits in the middle of a stream.

This allows the insertion of multiple empty static blocks for the
purpose of efficiently bringing a stream to a byte boundary.
This commit is contained in:
Mark Adler
2012-01-07 09:54:40 -08:00
parent 19761b8506
commit 263b1a05b0
4 changed files with 26 additions and 13 deletions

5
zlib.h
View File

@@ -734,8 +734,9 @@ ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
than or equal to 16, and that many of the least significant bits of value
will be inserted in the output.
deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
stream state was inconsistent.
deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough
room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the
source stream state was inconsistent.
*/
ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,