diff options
author | Nadeem Vawda <nadeem.vawda@gmail.com> | 2012-11-11 13:14:47 (GMT) |
---|---|---|
committer | Nadeem Vawda <nadeem.vawda@gmail.com> | 2012-11-11 13:14:47 (GMT) |
commit | 6ff262e18f7178b22b3cc6300d05a8cb008865d2 (patch) | |
tree | a536473c275798144982da06e42654c9fd7d3f13 /Doc/library/gzip.rst | |
parent | c8ac03d936fd9fa7b48c0aaac01b66e8d8fcf766 (diff) | |
parent | 19e568d254bea8202703302d0ada9bc93f99331a (diff) | |
download | cpython-6ff262e18f7178b22b3cc6300d05a8cb008865d2.zip cpython-6ff262e18f7178b22b3cc6300d05a8cb008865d2.tar.gz cpython-6ff262e18f7178b22b3cc6300d05a8cb008865d2.tar.bz2 |
Issue #15677: Document that zlib and gzip accept a compression level of 0 to mean 'no compression'.
Patch by Brian Brazil.
Diffstat (limited to 'Doc/library/gzip.rst')
-rw-r--r-- | Doc/library/gzip.rst | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/library/gzip.rst b/Doc/library/gzip.rst index 50d0462..2cbd2d5 100644 --- a/Doc/library/gzip.rst +++ b/Doc/library/gzip.rst @@ -38,7 +38,7 @@ The module defines the following items: ``'w'``, or ``'wb'`` for binary mode, or ``'rt'``, ``'at'``, or ``'wt'`` for text mode. The default is ``'rb'``. - The *compresslevel* argument is an integer from 1 to 9, as for the + The *compresslevel* argument is an integer from 0 to 9, as for the :class:`GzipFile` constructor. For binary mode, this function is equivalent to the :class:`GzipFile` @@ -80,9 +80,10 @@ The module defines the following items: in text mode, use :func:`.open` (or 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 |