summaryrefslogtreecommitdiff
path: root/Lib/gzip.py
diff options
context:
space:
mode:
authorNadeem Vawda <nadeem.vawda@gmail.com>2012-11-11 13:52:10 +0100
committerNadeem Vawda <nadeem.vawda@gmail.com>2012-11-11 13:52:10 +0100
commit04050b80b1d467737aa8c0192877fcc4cf72adc8 (patch)
treee0d9bbe0b77b2665ba10ba2096b564862f3a7b6e /Lib/gzip.py
parentc3197254acdbf2d9b8a86b68441b9b07fc85d0a4 (diff)
downloadcpython-git-04050b80b1d467737aa8c0192877fcc4cf72adc8.tar.gz
Issue #15677: Document that zlib and gzip accept a compression level of 0 to mean 'no compression'.
Patch by Brian Brazil.
Diffstat (limited to 'Lib/gzip.py')
-rw-r--r--Lib/gzip.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/gzip.py b/Lib/gzip.py
index 92a7eea0bc..a613bae876 100644
--- a/Lib/gzip.py
+++ b/Lib/gzip.py
@@ -66,9 +66,10 @@ class GzipFile(io.BufferedIOBase):
Be aware that only the 'rb', 'ab', and 'wb' values should be used
for cross-platform portability.
- 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