summaryrefslogtreecommitdiffstats
path: root/Doc/library/zlib.rst
diff options
context:
space:
mode:
authorNadeem Vawda <nadeem.vawda@gmail.com>2012-11-11 13:14:47 (GMT)
committerNadeem Vawda <nadeem.vawda@gmail.com>2012-11-11 13:14:47 (GMT)
commit6ff262e18f7178b22b3cc6300d05a8cb008865d2 (patch)
treea536473c275798144982da06e42654c9fd7d3f13 /Doc/library/zlib.rst
parentc8ac03d936fd9fa7b48c0aaac01b66e8d8fcf766 (diff)
parent19e568d254bea8202703302d0ada9bc93f99331a (diff)
downloadcpython-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/zlib.rst')
-rw-r--r--Doc/library/zlib.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/library/zlib.rst b/Doc/library/zlib.rst
index 42535a0..731023e 100644
--- a/Doc/library/zlib.rst
+++ b/Doc/library/zlib.rst
@@ -52,10 +52,10 @@ 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;
+ *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``. Raises the :exc:`error`
- exception if any error occurs.
+ 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 @@ The available exception and functions in this module are:
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``.