mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #15677: Document that zlib and gzip accept a compression level of 0 to mean 'no compression'.
Patch by Brian Brazil.
This commit is contained in:
parent
12489d98e6
commit
19e568d254
5 changed files with 22 additions and 16 deletions
|
@ -51,19 +51,20 @@ The available exception and functions in this module are:
|
|||
|
||||
.. function:: compress(data[, level])
|
||||
|
||||
Compresses the bytes in *data*, returning a bytes object containing compressed data.
|
||||
*level* is an integer from ``1`` to ``9`` controlling the level of compression;
|
||||
``1`` is fastest and produces the least compression, ``9`` is slowest and
|
||||
produces the most. The default value is ``6``. Raises the :exc:`error`
|
||||
exception if any error occurs.
|
||||
Compresses the bytes in *data*, returning a bytes object containing
|
||||
compressed data. *level* is an integer from ``0`` to ``9`` controlling the
|
||||
level of compression; ``1`` is fastest and produces the least compression,
|
||||
``9`` is slowest and produces the most. ``0`` is no compression. The default
|
||||
value is ``6``. Raises the :exc:`error` exception if any error occurs.
|
||||
|
||||
|
||||
.. function:: compressobj([level])
|
||||
|
||||
Returns a compression object, to be used for compressing data streams that won't
|
||||
fit into memory at once. *level* is an integer from ``1`` to ``9`` controlling
|
||||
fit into memory at once. *level* is an integer from ``0`` to ``9`` controlling
|
||||
the level of compression; ``1`` is fastest and produces the least compression,
|
||||
``9`` is slowest and produces the most. The default value is ``6``.
|
||||
``9`` is slowest and produces the most. ``0`` is no compression. The default
|
||||
value is ``6``.
|
||||
|
||||
|
||||
.. function:: crc32(data[, value])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue