89 repeated calls of the compression function. In the latter case, the 90 application must provide more input and/or consume the output 91 (providing more output space) before each call. 92 93 The library also supports reading and writing files in gzip (.gz) format 94 with an interface similar to that of stdio. 95 96 The library does not install any signal handler. The decoder checks 97 the consistency of the compressed data, so the library should never 98 crash even in case of corrupted input. 99 */ 100 101 typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); 102 typedef void (*free_func) OF((voidpf opaque, voidpf address)); 103 104 struct internal_state; 105 106 typedef struct z_stream_s { 107 Bytef *next_in; /* next input byte */ 108 uInt avail_in; /* number of bytes available at next_in */ 109 uLong total_in; /* total nb of input bytes read so far */ 110 111 Bytef *next_out; /* next output byte should be put there */ 112 uInt avail_out; /* remaining free space at next_out */ 113 uLong total_out; /* total nb of bytes output so far */ 114 115 char *msg; /* last error message, NULL if no error */ 116 struct internal_state FAR *state; /* not visible by applications */ 117 118 alloc_func zalloc; /* used to allocate the internal state */ 119 free_func zfree; /* used to free the internal state */ 120 voidpf opaque; /* private data object passed to zalloc and zfree */ 121 122 int data_type; /* best guess about the data type: ascii or binary */ 123 uLong adler; /* adler32 value of the uncompressed data */ 124 uLong reserved; /* reserved for future use */ 125 } z_stream; 126 127 typedef z_stream FAR *z_streamp; 128 129 /* 130 The application must update next_in and avail_in when avail_in has 131 dropped to zero. It must update next_out and avail_out when avail_out 132 has dropped to zero. The application must initialize zalloc, zfree and 133 opaque before calling the init function. All other fields are set by the | 89 repeated calls of the compression function. In the latter case, the 90 application must provide more input and/or consume the output 91 (providing more output space) before each call. 92 93 The library also supports reading and writing files in gzip (.gz) format 94 with an interface similar to that of stdio. 95 96 The library does not install any signal handler. The decoder checks 97 the consistency of the compressed data, so the library should never 98 crash even in case of corrupted input. 99 */ 100 101 typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); 102 typedef void (*free_func) OF((voidpf opaque, voidpf address)); 103 104 struct internal_state; 105 106 typedef struct z_stream_s { 107 Bytef *next_in; /* next input byte */ 108 uInt avail_in; /* number of bytes available at next_in */ 109 long long total_in; /* total nb of input bytes read so far */ 110 111 Bytef *next_out; /* next output byte should be put there */ 112 uInt avail_out; /* remaining free space at next_out */ 113 long long total_out; /* total nb of bytes output so far */ 114 115 char *msg; /* last error message, NULL if no error */ 116 struct internal_state FAR *state; /* not visible by applications */ 117 118 alloc_func zalloc; /* used to allocate the internal state */ 119 free_func zfree; /* used to free the internal state */ 120 voidpf opaque; /* private data object passed to zalloc and zfree */ 121 122 int data_type; /* best guess about the data type: ascii or binary */ 123 uLong adler; /* adler32 value of the uncompressed data */ 124 uLong reserved; /* reserved for future use */ 125 } z_stream; 126 127 typedef z_stream FAR *z_streamp; 128 129 /* 130 The application must update next_in and avail_in when avail_in has 131 dropped to zero. It must update next_out and avail_out when avail_out 132 has dropped to zero. The application must initialize zalloc, zfree and 133 opaque before calling the init function. All other fields are set by the |