diff options
Diffstat (limited to 'zlib.h')
-rw-r--r-- | zlib.h | 35 |
1 files changed, 27 insertions, 8 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* zlib.h -- interface of the 'zlib' general purpose compression library | 1 | /* zlib.h -- interface of the 'zlib' general purpose compression library |
2 | version 1.2.0.7, September 21st, 2003 | 2 | version 1.2.0.8, November 4th, 2003 |
3 | 3 | ||
4 | Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler | 4 | Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler |
5 | 5 | ||
@@ -37,8 +37,8 @@ | |||
37 | extern "C" { | 37 | extern "C" { |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #define ZLIB_VERSION "1.2.0.7" | 40 | #define ZLIB_VERSION "1.2.0.8" |
41 | #define ZLIB_VERNUM 0x1207 | 41 | #define ZLIB_VERNUM 0x1208 |
42 | 42 | ||
43 | /* | 43 | /* |
44 | The 'zlib' compression library provides in-memory compression and | 44 | The 'zlib' compression library provides in-memory compression and |
@@ -174,7 +174,7 @@ typedef z_stream FAR *z_streamp; | |||
174 | #define Z_BINARY 0 | 174 | #define Z_BINARY 0 |
175 | #define Z_ASCII 1 | 175 | #define Z_ASCII 1 |
176 | #define Z_UNKNOWN 2 | 176 | #define Z_UNKNOWN 2 |
177 | /* Possible values of the data_type field */ | 177 | /* Possible values of the data_type field (though see inflate()) */ |
178 | 178 | ||
179 | #define Z_DEFLATED 8 | 179 | #define Z_DEFLATED 8 |
180 | /* The deflate compression method (the only one supported in this version) */ | 180 | /* The deflate compression method (the only one supported in this version) */ |
@@ -373,12 +373,15 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); | |||
373 | 373 | ||
374 | The Z_BLOCK option assists in appending to or combining deflate streams. | 374 | The Z_BLOCK option assists in appending to or combining deflate streams. |
375 | Also to assist in this, on return inflate() will set strm->data_type to the | 375 | Also to assist in this, on return inflate() will set strm->data_type to the |
376 | number of unused bits in the last byte taken from strm->next_in, plus eight | 376 | number of unused bits in the last byte taken from strm->next_in, plus 64 |
377 | if inflate() is currently decoding the last block in the deflate stream, | 377 | if inflate() is currently decoding the last block in the deflate stream, |
378 | plus 16 if inflate() returned immediately after decoding an end-of-block | 378 | plus 128 if inflate() returned immediately after decoding an end-of-block |
379 | code or decoding the complete header up just before the first byte of the | 379 | code or decoding the complete header up to just before the first byte of the |
380 | deflate stream. The end-of-block will not be indicated until all of the | 380 | deflate stream. The end-of-block will not be indicated until all of the |
381 | uncompressed data from that block has been written to strm->next_out. | 381 | uncompressed data from that block has been written to strm->next_out. The |
382 | number of unused bits may in general be greater than seven, except when | ||
383 | bit 7 of data_type is set, in which case the number of unused bits will be | ||
384 | less than eight. | ||
382 | 385 | ||
383 | inflate() should normally be called until it returns Z_STREAM_END or an | 386 | inflate() should normally be called until it returns Z_STREAM_END or an |
384 | error. However if all decompression is to be performed in a single step | 387 | error. However if all decompression is to be performed in a single step |
@@ -598,6 +601,22 @@ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, | |||
598 | for deflation in a single pass, and so would be called before deflate(). | 601 | for deflation in a single pass, and so would be called before deflate(). |
599 | */ | 602 | */ |
600 | 603 | ||
604 | ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, | ||
605 | int bits, | ||
606 | int value)); | ||
607 | /* | ||
608 | deflatePrime() inserts bits in the deflate output stream. The intent | ||
609 | is that this function is used to start off the deflate output with the | ||
610 | bits leftover from a previous deflate stream when appending to it. As such, | ||
611 | this function can only be used for raw deflate, and must be used before the | ||
612 | first deflate() call after a deflateInit2() or deflateReset(). bits must be | ||
613 | less than or equal to 16, and that many of the least significant bits of | ||
614 | value will be inserted in the output. | ||
615 | |||
616 | deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source | ||
617 | stream state was inconsistent. | ||
618 | */ | ||
619 | |||
601 | /* | 620 | /* |
602 | ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, | 621 | ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, |
603 | int windowBits)); | 622 | int windowBits)); |