summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-02-03 07:06:33 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-02-03 07:06:33 (GMT)
commit567d513b9bf24ea5f58c4ca0fc3e25c887b85dcf (patch)
tree7ce3408a0c559d47f1043ee266ff9b920698f976 /Doc/library
parentb00da57561505eb220a107fab0e7fbc322f767ac (diff)
downloadcpython-567d513b9bf24ea5f58c4ca0fc3e25c887b85dcf.zip
cpython-567d513b9bf24ea5f58c4ca0fc3e25c887b85dcf.tar.gz
cpython-567d513b9bf24ea5f58c4ca0fc3e25c887b85dcf.tar.bz2
Issue #26244: Clarify default zlib compression level in documentation
Based on patch by Aviv Palivoda.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/zlib.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/zlib.rst b/Doc/library/zlib.rst
index a815d1f..1869bb8 100644
--- a/Doc/library/zlib.rst
+++ b/Doc/library/zlib.rst
@@ -60,10 +60,11 @@ 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 ``0`` to ``9``. A value
- of ``1`` is fastest and produces the least compression, while a value of
+ *level* is the compression level -- an integer from ``0`` to ``9`` or ``-1``.
+ A value of ``1`` is fastest and produces the least compression, while a value of
``9`` is slowest and produces the most. ``0`` is no compression. The default
- value is ``6``.
+ value is ``-1`` (Z_DEFAULT_COMPRESSION). Z_DEFAULT_COMPRESSION represents a default
+ compromise between speed and compression (currently equivalent to level 6).
*method* is the compression algorithm. Currently, the only supported value is
``DEFLATED``.