• Home
  • Raw
  • Download

Lines Matching +full:zlib +full:- +full:level

1 :mod:`zlib` --- Compression compatible with :program:`gzip`
4 .. module:: zlib
5 :synopsis: Low-level interface to compression and decompression routines
8 --------------
11 allow compression and decompression, using the zlib library. The zlib library
12 has its own home page at https://www.zlib.net. There are known
13 incompatibilities between the Python module and versions of the zlib library
14 earlier than 1.1.3; 1.1.3 has a `security vulnerability <https://zlib.net/zlib_faq.html#faq33>`_, s…
17 zlib's functions have many options and often need to be used in a particular
19 consult the zlib manual at http://www.zlib.net/manual.html for authoritative
34 Computes an Adler-32 checksum of *data*. (An Adler-32 checksum is almost as
36 is an unsigned 32-bit integer. If *value* is present, it is used as
47 .. function:: compress(data, /, level=-1, wbits=MAX_WBITS)
50 *level* is an integer from ``0`` to ``9`` or ``-1`` controlling the level of compression;
53 The default value is ``-1`` (Z_DEFAULT_COMPRESSION). Z_DEFAULT_COMPRESSION represents a default
54 compromise between speed and compression (currently equivalent to level 6).
56 .. _compress-wbits:
63 * +9 to +15: The base-two logarithm of the window size, which
66 resulting output will include a zlib-specific header and trailer.
79 *level* can now be used as a keyword parameter.
85 .. function:: compressobj(level=-1, method=DEFLATED, wbits=MAX_WBITS, memLevel=DEF_MEM_LEVEL, strat…
90 *level* is the compression level -- an integer from ``0`` to ``9`` or ``-1``.
93 ``0`` (Z_NO_COMPRESSION) is no compression. The default value is ``-1`` (Z_DEFAULT_COMPRESSION).
95 (currently equivalent to level 6).
102 the same meaning as `described for compress() <#compress-wbits>`__.
110 :const:`Z_RLE` (zlib 1.2.0.1) and :const:`Z_FIXED` (zlib 1.2.2.2).
128 result is an unsigned 32-bit integer. If *value* is present, it is used
147 .. _decompress-wbits:
154 * +8 to +15: The base-two logarithm of the window size. The input
155 must include a zlib header and trailer.
157 * 0: Automatically determine the window size from the zlib header.
158 Only supported since zlib 1.2.3.5.
169 the zlib or gzip format.
172 than the size originally used to compress the stream; using a too-small
174 corresponds to the largest window size and requires a zlib header and
192 the same meaning as `described for decompress() <#decompress-wbits>`__.
224 :const:`Z_FULL_FLUSH`, :const:`Z_BLOCK` (zlib 1.2.3.4), or :const:`Z_FINISH`,
258 buffer. This data has not yet been seen by the zlib machinery, so you must feed
282 If the optional parameter *max_length* is non-zero then the return value will be
315 Information about the version of the zlib library in use is available through
321 The version string of the zlib library that was used for building the module.
322 This may be different from the zlib library actually used at runtime, which
328 The version string of the zlib library actually loaded by the interpreter.
336 Reading and writing :program:`gzip`\ -format files.
338 http://www.zlib.net
339 The zlib library home page.
341 http://www.zlib.net/manual.html
342 The zlib manual explains the semantics and usage of the library's many