diff options
Diffstat (limited to 'zlib.h')
-rw-r--r-- | zlib.h | 24 |
1 files changed, 12 insertions, 12 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.1.2, September 9th, 2004 | 2 | version 1.2.2, October 3rd, 2004 |
3 | 3 | ||
4 | Copyright (C) 1995-2004 Jean-loup Gailly and Mark Adler | 4 | Copyright (C) 1995-2004 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.1.2" | 40 | #define ZLIB_VERSION "1.2.2" |
41 | #define ZLIB_VERNUM 0x1212 | 41 | #define ZLIB_VERNUM 0x1220 |
42 | 42 | ||
43 | /* | 43 | /* |
44 | The 'zlib' compression library provides in-memory compression and | 44 | The 'zlib' compression library provides in-memory compression and |
@@ -53,24 +53,22 @@ extern "C" { | |||
53 | application must provide more input and/or consume the output | 53 | application must provide more input and/or consume the output |
54 | (providing more output space) before each call. | 54 | (providing more output space) before each call. |
55 | 55 | ||
56 | The compressed data format used by the in-memory functions is the zlib | 56 | The compressed data format used by default by the in-memory functions is |
57 | format, which is a zlib wrapper documented in RFC 1950, wrapped around a | 57 | the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped |
58 | deflate stream, which is itself documented in RFC 1951. | 58 | around a deflate stream, which is itself documented in RFC 1951. |
59 | 59 | ||
60 | The library also supports reading and writing files in gzip (.gz) format | 60 | The library also supports reading and writing files in gzip (.gz) format |
61 | with an interface similar to that of stdio using the functions that start | 61 | with an interface similar to that of stdio using the functions that start |
62 | with "gz". The gzip format is different from the zlib format. gzip is a | 62 | with "gz". The gzip format is different from the zlib format. gzip is a |
63 | gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. | 63 | gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. |
64 | 64 | ||
65 | This library can optionally read and write gzip streams in memory as well. | ||
66 | |||
65 | The zlib format was designed to be compact and fast for use in memory | 67 | The zlib format was designed to be compact and fast for use in memory |
66 | and on communications channels. The gzip format was designed for single- | 68 | and on communications channels. The gzip format was designed for single- |
67 | file compression on file systems, has a larger header than zlib to maintain | 69 | file compression on file systems, has a larger header than zlib to maintain |
68 | directory information, and uses a different, slower check method than zlib. | 70 | directory information, and uses a different, slower check method than zlib. |
69 | 71 | ||
70 | This library does not provide any functions to write gzip files in memory. | ||
71 | However such functions could be easily written using zlib's deflate function, | ||
72 | the documentation in the gzip RFC, and the examples in gzio.c. | ||
73 | |||
74 | The library does not install any signal handler. The decoder checks | 72 | The library does not install any signal handler. The decoder checks |
75 | the consistency of the compressed data, so the library should never | 73 | the consistency of the compressed data, so the library should never |
76 | crash even in case of corrupted input. | 74 | crash even in case of corrupted input. |
@@ -478,7 +476,8 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, | |||
478 | 16 to windowBits to write a simple gzip header and trailer around the | 476 | 16 to windowBits to write a simple gzip header and trailer around the |
479 | compressed data instead of a zlib wrapper. The gzip header will have no | 477 | compressed data instead of a zlib wrapper. The gzip header will have no |
480 | file name, no extra data, no comment, no modification time (set to zero), | 478 | file name, no extra data, no comment, no modification time (set to zero), |
481 | no header crc, and the operating system will be set to 255 (unknown). | 479 | no header crc, and the operating system will be set to 255 (unknown). If a |
480 | gzip stream is being written, strm->adler is a crc32 instead of an adler32. | ||
482 | 481 | ||
483 | The memLevel parameter specifies how much memory should be allocated | 482 | The memLevel parameter specifies how much memory should be allocated |
484 | for the internal compression state. memLevel=1 uses minimum memory but | 483 | for the internal compression state. memLevel=1 uses minimum memory but |
@@ -649,7 +648,8 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, | |||
649 | windowBits can also be greater than 15 for optional gzip decoding. Add | 648 | windowBits can also be greater than 15 for optional gzip decoding. Add |
650 | 32 to windowBits to enable zlib and gzip decoding with automatic header | 649 | 32 to windowBits to enable zlib and gzip decoding with automatic header |
651 | detection, or add 16 to decode only the gzip format (the zlib format will | 650 | detection, or add 16 to decode only the gzip format (the zlib format will |
652 | return a Z_DATA_ERROR). | 651 | return a Z_DATA_ERROR. If a gzip stream is being decoded, strm->adler is |
652 | a crc32 instead of an adler32. | ||
653 | 653 | ||
654 | inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough | 654 | inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough |
655 | memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative | 655 | memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative |