92 This library can optionally read and write gzip streams in memory as well. 93 94 The zlib format was designed to be compact and fast for use in memory 95 and on communications channels. The gzip format was designed for single- 96 file compression on file systems, has a larger header than zlib to maintain 97 directory information, and uses a different, slower check method than zlib. 98 99 The library does not install any signal handler. The decoder checks 100 the consistency of the compressed data, so the library should never crash 101 even in case of corrupted input. 102 */ 103 104 typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); 105 typedef void (*free_func) OF((voidpf opaque, voidpf address)); 106 107 struct internal_state; 108 109 typedef struct z_stream_s { 110 Bytef *next_in; /* next input byte */ 111 uInt avail_in; /* number of bytes available at next_in */ 112 long long total_in; /* total nb of input bytes read so far */ 113 114 Bytef *next_out; /* next output byte should be put there */ 115 uInt avail_out; /* remaining free space at next_out */ 116 long long total_out;/* total nb of bytes output so far */ 117 118 char *msg; /* last error message, NULL if no error */ 119 struct internal_state FAR *state; /* not visible by applications */ 120 121 alloc_func zalloc; /* used to allocate the internal state */ 122 free_func zfree; /* used to free the internal state */ 123 voidpf opaque; /* private data object passed to zalloc and zfree */ 124 125 int data_type; /* best guess about the data type: binary or text */ 126 uLong adler; /* adler32 value of the uncompressed data */ 127 uLong reserved; /* reserved for future use */ 128 } z_stream; 129 130 typedef z_stream FAR *z_streamp; 131 132 /* 133 gzip header information passed to and from zlib routines. See RFC 1952 134 for more details on the meanings of these fields. 135 */ 136 typedef struct gz_header_s { | 92 This library can optionally read and write gzip streams in memory as well. 93 94 The zlib format was designed to be compact and fast for use in memory 95 and on communications channels. The gzip format was designed for single- 96 file compression on file systems, has a larger header than zlib to maintain 97 directory information, and uses a different, slower check method than zlib. 98 99 The library does not install any signal handler. The decoder checks 100 the consistency of the compressed data, so the library should never crash 101 even in case of corrupted input. 102 */ 103 104 typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); 105 typedef void (*free_func) OF((voidpf opaque, voidpf address)); 106 107 struct internal_state; 108 109 typedef struct z_stream_s { 110 Bytef *next_in; /* next input byte */ 111 uInt avail_in; /* number of bytes available at next_in */ 112 uLong total_in; /* total nb of input bytes read so far */ 113 114 Bytef *next_out; /* next output byte should be put there */ 115 uInt avail_out; /* remaining free space at next_out */ 116 uLong total_out; /* total nb of bytes output so far */ 117 118 char *msg; /* last error message, NULL if no error */ 119 struct internal_state FAR *state; /* not visible by applications */ 120 121 alloc_func zalloc; /* used to allocate the internal state */ 122 free_func zfree; /* used to free the internal state */ 123 voidpf opaque; /* private data object passed to zalloc and zfree */ 124 125 int data_type; /* best guess about the data type: binary or text */ 126 uLong adler; /* adler32 value of the uncompressed data */ 127 uLong reserved; /* reserved for future use */ 128 } z_stream; 129 130 typedef z_stream FAR *z_streamp; 131 132 /* 133 gzip header information passed to and from zlib routines. See RFC 1952 134 for more details on the meanings of these fields. 135 */ 136 typedef struct gz_header_s { |