diff -r 6ccb04c4cbae Doc/library/gzip.rst --- a/Doc/library/gzip.rst Fri Sep 28 01:15:39 2012 -0700 +++ b/Doc/library/gzip.rst Fri Sep 28 12:47:13 2012 +0100 @@ -38,7 +38,7 @@ ``'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 @@ 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 diff -r 6ccb04c4cbae Doc/library/zlib.rst --- a/Doc/library/zlib.rst Fri Sep 28 01:15:39 2012 -0700 +++ b/Doc/library/zlib.rst Fri Sep 28 12:47:13 2012 +0100 @@ -51,11 +51,11 @@ .. 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=-1, method=DEFLATED, wbits=15, memlevel=8, strategy=Z_DEFAULT_STRATEGY[, zdict]) @@ -63,9 +63,10 @@ Returns a compression object, to be used for compressing data streams that won't fit into memory at once. - *level* is the compression level -- an integer from ``1`` to ``9``. A value + *level* is the compression level -- an integer from ``0`` to ``9``. A value of ``1`` is fastest and produces the least compression, while a value of - ``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``. *method* is the compression algorithm. Currently, the only supported value is ``DEFLATED``. diff -r 6ccb04c4cbae Lib/gzip.py --- a/Lib/gzip.py Fri Sep 28 01:15:39 2012 -0700 +++ b/Lib/gzip.py Fri Sep 28 12:47:13 2012 +0100 @@ -160,9 +160,10 @@ A mode of 'r' is equivalent to one of 'rb', and similarly for 'w' and 'wb', and 'a' and 'ab'. - The compresslevel argument is an integer from 1 to 9 controlling the + 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. The default is 9. + and 9 is slowest and produces the most compression. 0 is no compression + at all. The default is 9. The mtime argument is an optional numeric timestamp to be written to the stream when compressing. All gzip compressed streams