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:
Nadeem Vawda 2012-11-11 14:04:14 +01:00
parent 12489d98e6
commit 19e568d254
5 changed files with 22 additions and 16 deletions

View file

@ -50,9 +50,10 @@ The module defines the following items:
supported. If you need to read a compressed file in text mode, wrap your
:class:`GzipFile` with an :class:`io.TextIOWrapper`.
The *compresslevel* argument is an integer from ``1`` to ``9`` controlling the
level of compression; ``1`` is fastest and produces the least compression, and
``9`` is slowest and produces the most compression. The default is ``9``.
The *compresslevel* argument is an integer from ``0`` to ``9`` controlling
the level of compression; ``1`` is fastest and produces the least
compression, and ``9`` is slowest and produces the most compression. ``0``
is no compression. The default is ``9``.
The *mtime* argument is an optional numeric timestamp to be written to
the stream when compressing. All :program:`gzip` compressed streams are