Lines Matching full:is

6   This software is provided 'as-is', without any express or implied
10 Permission is granted to anyone to use this software for any purpose,
17 appreciated but is not required.
26 The data format used by the zlib library is described by RFCs (Request for
51 enough (for example if an input file is mmap'ed), or can be done by
56 The compressed data format used by default by the in-memory functions is
57 the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
58 around a deflate stream, which is itself documented in RFC 1951.
62 with "gz". The gzip format is different from the zlib format. gzip is a
140 zalloc must return Z_NULL if there is not enough memory for the object.
141 If zlib is used in a multi-threaded application, zalloc and zfree must be
146 if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
214 If the first character differs, the library code actually used is
216 This check is automatically made by deflateInit and inflateInit.
229 all (the input data is simply copied a block at a time).
234 enough memory, Z_STREAM_ERROR if level is not a valid compression level,
235 Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
237 msg is set to null if there is no error message. deflateInit does not
253 accordingly. If not all input can be processed (because there is not
258 accordingly. This action is forced if the parameter flush is non zero.
261 Some output may be provided even if flush is not set.
264 one of the actions is possible, by providing more input and/or consuming
267 compressed output when it wants, for example when the output buffer is full
272 Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
276 If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
277 flushed to the output buffer and the output is aligned on a byte boundary, so
279 avail_in is zero after the call if enough output space has been provided
283 If flush is set to Z_FULL_FLUSH, all output is flushed as with
284 Z_SYNC_FLUSH, and the compression state is reset so that decompression can
286 random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
291 avail_out), until the flush is complete (deflate returns with non-zero
293 avail_out is greater than six to avoid repeated flush markers due to
296 If the parameter flush is set to Z_FINISH, pending input is processed,
297 pending output is flushed and deflate returns with Z_STREAM_END if there
305 is to be done in a single step. In this case, avail_out must be at least
310 so far (that is, total_in bytes).
313 the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered
314 binary. This field is only for information purposes and does not affect
319 consumed and all output has been produced (only when flush is set to
321 if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
322 (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
347 the caller. If next_in is not Z_NULL and avail_in is large enough (the exact
355 memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
356 version assumed by the caller. msg is set to null if there is no error
374 accordingly. If not all input can be processed (because there is not
375 enough room in the output buffer), next_in is updated and processing
380 is no more input data or no more space in the output buffer (see below
384 one of the actions is possible, by providing more input and/or consuming
387 example when the output buffer is full (avail_out == 0), or after each
404 if inflate() is currently decoding the last block in the deflate stream,
410 bit 7 of data_type is set, in which case the number of unused bits will be
414 error. However if all decompression is to be performed in a single step
416 Z_FINISH. In this case all pending input is processed and all pending
417 output is flushed; avail_out must be large enough to hold all the
421 is never required, but can be used to inform inflate that a faster approach
427 is on the return value of inflate(), as noted below, or when it returns early
428 because Z_BLOCK is used.
430 If a preset dictionary is needed after this call (see inflateSetDictionary
433 strm->adler to the adler32 checksum of all output produced so far (that is,
436 checksum is equal to that saved by the compressor and returns Z_STREAM_END
437 only if the checksum is correct.
440 deflate data. The header type is detected automatically. Any information
441 contained in the gzip header is not retained, so applications that need that
449 preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
453 Z_BUF_ERROR if no progress is possible or if there was not enough room in the
454 output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
456 continue decompressing. If Z_DATA_ERROR is returned, the application may then
458 of the data is desired.
487 This is another version of deflateInit with more compression options. The
491 The method parameter is the compression method. It must be Z_DEFLATED in
494 The windowBits parameter is the base two logarithm of the window size
497 compression at the expense of memory usage. The default value is 15 if
498 deflateInit is used instead.
509 gzip stream is being written, strm->adler is a crc32 instead of an adler32.
513 is slow and reduces compression ratio; memLevel=9 uses maximum memory
514 for optimal speed. The default value is 8. See zconf.h for total memory
517 The strategy parameter is used to tune the compression algorithm. Use the
522 random distribution. In this case, the compression algorithm is tuned to
523 compress them better. The effect of Z_FILTERED is to force more Huffman
524 coding and less string matching; it is somewhat intermediate between
525 Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as
528 compressed output even if it is not set appropriately. Z_FIXED prevents the
533 memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid
534 method). msg is set to null if there is no error message. deflateInit2 does
551 dictionary is most useful when the data to be compressed is short and can be
557 discarded, for example if the dictionary is larger than the window size in
563 Upon return of this function, strm->adler is set to the adler32 value
566 applies to the whole dictionary even if only a subset of the dictionary is
568 adler32 value is not computed and strm->adler is not set.
571 parameter is invalid (such as NULL dictionary) or the stream state is
573 or if the compression method is bsort). deflateSetDictionary does not
586 compression state which can be quite large, so this strategy is slow and
591 (such as zalloc being NULL). msg is left unchanged in both source and
597 This function is equivalent to deflateEnd followed by deflateInit,
611 interpretation of level and strategy is as in deflateInit2. This can be
614 strategy. If the compression level is changed, the input available so far
615 is compressed with the old level (and may be flushed); the new level will
658 is that this function is used to start off the deflate output with the
673 stream is requested by deflateInit2(). deflateSetHeader() may be called
676 in the provided gz_header structure are written to the gzip header (xflag is
679 a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
680 available there. If hcrc is true, a gzip header crc is included. Note that
682 1.3.x) do not support header crc's, and will report that it is a "multi-part
685 If deflateSetHeader is not used, the default gzip header has text false,
687 fields. The gzip header is returned to the default state by deflateReset().
697 This is another version of inflateInit with an extra parameter. The
701 The windowBits parameter is the base two logarithm of the maximum window
703 this version of the library. The default value is 15 if inflateInit is used
707 size is given as input, inflate() will return with the error code
714 is for use with other formats that use the deflate compressed data format
716 format is developed using the raw deflate format for compressed data, it is
718 the uncompressed data as is done in the zlib, gzip, and zip formats. For
719 most applications, the zlib format should be used as is. Note that comments
725 return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is
729 memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg
730 is set to null if there is no error message. inflateInit2 does not perform
748 dictionary that was used for compression is provided.
751 parameter is invalid (such as NULL dictionary) or the stream state is
762 available input is skipped. No output is provided.
785 (such as zalloc being NULL). msg is left unchanged in both source and
791 This function is equivalent to inflateEnd followed by inflateInit,
803 This function inserts bits in the inflate input stream. The intent is
804 that this function is used to start inflating at a bit position in the
821 As inflate() processes the gzip stream, head->done is zero until the header
822 is completed, at which time head->done is set to one. If a zlib stream is
823 being decoded, then head->done is set to -1 to indicate that there will be
825 force inflate() to return immediately after header processing is complete
826 and before any actual data is decompressed.
829 contents. hcrc is set to true if there is a header CRC. (The header CRC
830 was valid if done is set to one.) If extra is not Z_NULL, then extra_max
831 contains the maximum number of bytes to write to extra. Once done is true,
833 extra field, or that field truncated if extra_max is less than extra_len.
834 If name is not Z_NULL, then up to name_max characters are written there,
835 terminated with a zero unless the length is greater than name_max. If
836 comment is not Z_NULL, then up to comm_max characters are written there,
837 terminated with a zero unless the length is greater than comm_max. When
838 any of extra, name, or comment are not Z_NULL and the respective field is
839 not present in the header, then that field is set to Z_NULL to signal its
845 If inflateGetHeader is not used, then the header information is simply
846 discarded. The header is always checked for validity, including the header
862 derived memory allocation routines are used. windowBits is the base two
863 logarithm of the window size, in the range 8..15. window is a caller
864 supplied buffer of that size. Except for special applications where it is
885 interface for input and output. This is more efficient than inflate() for
894 deflate stream with each call. inflateBackEnd() is then called to free
897 A raw deflate stream is one with no zlib or gzip header or trailer.
901 only the raw deflate stream to decompress. This is different from the
912 there is no input available, in() must return zero--buf is ignored in that
918 inflateBackInit(), which is also the buffer that out() uses to write from.
923 setting strm->next_in and strm->avail_in. If that input is exhausted, then
925 calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called
926 immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in
927 must also be initialized, and then if strm->avail_in is not zero, input will
930 The in_desc and out_desc parameters of inflateBack() is passed as the
939 error in the deflate stream (in which case strm->msg is set to indicate the
943 an error. If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to
945 strm->next_in is assured to be defined if out() returns non-zero.) Note
951 All memory allocated by inflateBackInit() is freed.
989 The sprintf variant used by gzprintf (zero is best):
1012 Compresses the source buffer into the destination buffer. sourceLen is
1013 the byte length of the source buffer. Upon entry, destLen is the total
1015 by compressBound(sourceLen). Upon exit, destLen is the actual size of the
1018 input file is mmap'ed.
1029 parameter has the same meaning as in deflateInit. sourceLen is the byte
1030 length of the source buffer. Upon entry, destLen is the total size of the
1032 compressBound(sourceLen). Upon exit, destLen is the actual size of the
1037 Z_STREAM_ERROR if the level parameter is invalid.
1050 Decompresses the source buffer into the destination buffer. sourceLen is
1051 the byte length of the source buffer. Upon entry, destLen is the total
1056 Upon exit, destLen is the actual size of the compressed buffer.
1058 input file is mmap'ed.
1071 is as in fopen ("rb" or "wb") but can also include a compression level
1077 gzopen can be used to read a file which is not in gzip format; in this
1082 can be checked to distinguish the two cases (if errno is zero, the
1083 zlib error is Z_MEM_ERROR). */
1090 The mode parameter is as in gzopen.
1127 uncompressed bytes written is limited to 4095. The caller should assure that
1128 this limit is not exceeded. If it is exceeded, then gzprintf() will return
1130 buffer overflow with unpredictable consequences, which is possible only if
1145 a newline character is read and transferred to buf, or an end-of-file
1146 condition is encountered. The string is then terminated with a null
1166 Only one character of push-back is allowed. gzungetc() returns the
1168 character has been pushed but not read yet, or if c is -1. The pushed
1169 character will be discarded if the stream is repositioned with gzseek()
1176 flush is as in the deflate() function. The return value is the zlib
1178 the flush parameter is Z_FINISH and all output could be flushed.
1188 uncompressed data stream. The whence parameter is defined as in lseek(2);
1189 the value SEEK_END is not supported.
1190 If the file is opened for reading, this function is emulated but can be
1191 extremely slow. If the file is opened for writing, only forward seeks are
1197 particular if the file is opened for writing and the new starting position
1203 Rewinds the given file. This function is supported only for reading.
1205 gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
1214 gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
1225 Returns 1 if file is being read directly without decompression, otherwise
1232 and deallocates all the (de)compression state. The return value is the zlib
1239 given compressed file. errnum is set to zlib error number. If an
1241 errnum is set to Z_ERRNO and the application may consult errno
1247 Clears the error and end-of-file flags for file. This is analogous to the
1248 clearerr() function in stdio. This is useful for continuing to read a gzip
1249 file that is being written concurrently.
1263 return the updated checksum. If buf is NULL, this function returns
1265 An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
1289 updated CRC-32. If buf is NULL, this function returns the required initial
1290 value for the for the crc. Pre- and post-conditioning (one's complement) is