Lines Matching +full:input +full:- +full:only

1 /* zlib.h -- interface of the 'zlib' general purpose compression library
3 Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
5 This software is provided 'as-is', without any express or implied
21 Jean-loup Gailly Mark Adler
44 this checks there is no more input data available and the next data
53 The 'zlib' compression library provides in-memory compression and
55 data. This version of the library supports only one compression method
60 enough (for example if an input file is mmap'ed), or can be done by
62 application must provide more input and/or consume the output
65 The compressed data format used by default by the in-memory functions is
73 and on communications channels. The gzip format was designed for single-
79 crash even in case of corrupted input.
85 const Byte *next_in; /* next input byte */
87 uLong total_in; /* total nb of input bytes read so far */
118 If zlib is used in a multi-threaded application, zalloc and zfree must be
121 On 16-bit systems, the functions zalloc and zfree must be able to allocate
128 compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
145 #define Z_BLOCK 6 /* Only for inflate at present */
151 #define Z_ERRNO (-1)
152 #define Z_STREAM_ERROR (-2)
153 #define Z_DATA_ERROR (-3)
154 #define Z_MEM_ERROR (-4)
155 #define Z_BUF_ERROR (-5)
156 #define Z_VERSION_ERROR (-6)
164 #define Z_DEFAULT_COMPRESSION (-1)
178 /* The deflate compression method (the only one supported in this version) */
184 Returns the number of bytes that needs to be allocated for a per-
186 number of bytes should be returned in stream->workspace before
196 Returns 1 if Deflate-Conversion facility is installed and enabled,
210 all (the input data is simply copied a block at a time).
225 deflate compresses as much data as possible, and stops when the input
227 output latency (reading input without producing any output) except when
233 - Compress more input starting at next_in and update next_in and avail_in
234 accordingly. If not all input can be processed (because there is not
238 - Provide more output starting at next_out and update next_out and avail_out
241 should be set only when necessary (in interactive applications).
245 one of the actions is possible, by providing more input and/or consuming
255 that the decompressor can get all input data available so far. (In particular
258 algorithms and so it should be used only when necessary.
268 avail_out), until the flush is complete (deflate returns with non-zero
271 If the parameter flush is set to Z_FINISH, pending input is processed,
275 more input data, until it returns with Z_STREAM_END or an error. After
276 deflate has returned Z_STREAM_END, the only possible operations on the
284 deflate() sets strm->adler to the adler32 checksum of all input read
288 the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered
289 binary. This field is only for information purposes and does not affect
292 deflate() returns Z_OK if some progress has been made (more input
293 processed or more output produced), Z_STREAM_END if all input has been
294 consumed and all output has been produced (only when flush is set to
304 This function discards any unprocessed input and does not flush any
309 prematurely (some input or output was discarded). In the error case,
317 Returns the number of bytes that needs to be allocated for a per-
319 returned in stream->workspace before calling zlib_inflateInit().
345 inflate decompresses as much data as possible, and stops when the input
347 some output latency (reading input without producing any output) except when
353 - Decompress more input starting at next_in and update next_in and avail_in
354 accordingly. If not all input can be processed (because there is not
358 - Provide more output starting at next_out and update next_out and avail_out
360 is no more input data or no more space in the output buffer (see below
364 one of the actions is possible, by providing more input and/or consuming
382 Also to assist in this, on return inflate() will set strm->data_type to the
383 number of unused bits in the last byte taken from strm->next_in, plus 64
385 plus 128 if inflate() returned immediately after decoding an end-of-block
387 deflate stream. The end-of-block will not be indicated until all of the
388 uncompressed data from that block has been written to strm->next_out. The
396 Z_FINISH. In this case all pending input is processed and all pending
406 first call. So the only effect of the flush parameter in this implementation
411 below), inflate sets strm->adler to the adler32 checksum of the dictionary
413 strm->adler to the adler32 checksum of all output produced so far (that is,
417 only if the checksum is correct.
419 inflate() will decompress and check either zlib-wrapped or gzip-wrapped
426 inflate() returns Z_OK if some progress has been made (more input processed
429 preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
430 corrupted (input stream not conforming to the zlib format or incorrect check
435 inflate() can be called again with more input and more output space to
445 This function discards any unprocessed input and does not flush any
456 The following functions are needed only in some special applications.
488 filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no
493 between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects
532 size is given as input, inflate() will return with the error code
535 windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
549 detection, or add 16 to decode only the gzip format (the zlib format will
550 return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is