summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2013-10-17 17:51:00 (GMT)
committerGeorg Brandl <georg@python.org>2013-10-17 17:51:00 (GMT)
commitcea38084ebf10af90907396ce062674d0b933be1 (patch)
tree3ddf7a6d02a3d58a4a5e10e0cc7b511adf1ad867
parent2235648b86304d359da23b5d2954729c82d4c132 (diff)
downloadcpython-cea38084ebf10af90907396ce062674d0b933be1.zip
cpython-cea38084ebf10af90907396ce062674d0b933be1.tar.gz
cpython-cea38084ebf10af90907396ce062674d0b933be1.tar.bz2
Closes #19277: document all parameters of compressobj().
-rw-r--r--Doc/library/zlib.rst17
1 files changed, 16 insertions, 1 deletions
diff --git a/Doc/library/zlib.rst b/Doc/library/zlib.rst
index a3a27c5..192bd4d 100644
--- a/Doc/library/zlib.rst
+++ b/Doc/library/zlib.rst
@@ -68,7 +68,7 @@ The available exception and functions in this module are:
Raises the :exc:`error` exception if any error occurs.
-.. function:: compressobj([level])
+.. function:: compressobj([level[, method[, wbits[, memlevel[, strategy]]]]])
Returns a compression object, to be used for compressing data streams that won't
fit into memory at once. *level* is an integer from ``0`` to ``9`` controlling
@@ -76,6 +76,21 @@ The available exception and functions in this module are:
``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``.
+
+ *wbits* is the base two logarithm of the size of the window buffer. This
+ should be an integer from ``8`` to ``15``. Higher values give better
+ compression, but use more memory. The default is 15.
+
+ *memlevel* controls the amount of memory used for internal compression state.
+ Valid values range from ``1`` to ``9``. Higher values using more memory,
+ but are faster and produce smaller output. The default is 8.
+
+ *strategy* is used to tune the compression algorithm. Possible values are
+ ``Z_DEFAULT_STRATEGY``, ``Z_FILTERED``, and ``Z_HUFFMAN_ONLY``. The default
+ is ``Z_DEFAULT_STRATEGY``.
+
.. function:: crc32(data[, value])