diff options
author | Nadeem Vawda <nadeem.vawda@gmail.com> | 2012-06-21 23:40:49 (GMT) |
---|---|---|
committer | Nadeem Vawda <nadeem.vawda@gmail.com> | 2012-06-21 23:40:49 (GMT) |
commit | 2180c97a0055c8c2f6f2cf0754bfb650d7cc0f34 (patch) | |
tree | bb3046c556ba28f862e870d34e2b5b11c3d9e649 /Modules | |
parent | cf5e1d82e3c0910f094727b6ef8e2a63da9ed8cf (diff) | |
download | cpython-2180c97a0055c8c2f6f2cf0754bfb650d7cc0f34.zip cpython-2180c97a0055c8c2f6f2cf0754bfb650d7cc0f34.tar.gz cpython-2180c97a0055c8c2f6f2cf0754bfb650d7cc0f34.tar.bz2 |
Document the rest of zlib.compressobj()'s arguments.
Original patch by Jim Jewett; see issue 14684.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/zlibmodule.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c index a44ed0d..6519194 100644 --- a/Modules/zlibmodule.c +++ b/Modules/zlibmodule.c @@ -81,13 +81,26 @@ zlib_error(z_stream zst, int err, char *msg) } PyDoc_STRVAR(compressobj__doc__, -"compressobj([level[, method[, wbits[, memlevel[, strategy[, zdict]]]]]])\n" +"compressobj(level=-1, method=DEFLATED, wbits=15, memlevel=8,\n" +" strategy=Z_DEFAULT_STRATEGY[, zdict])\n" " -- Return a compressor object.\n" "\n" -"Optional arg level is the compression level, in 1-9.\n" +"level is the compression level (an integer in the range 0-9; default is 6).\n" +"Higher compression levels are slower, but produce smaller results.\n" "\n" -"Optional arg zdict is the predefined compression dictionary - a sequence of\n" -"bytes containing subsequences that are likely to occur in the input data."); +"method is the compression algorithm. If given, this must be DEFLATED.\n" +"\n" +"wbits is the base two logarithm of the window size (range: 8..15).\n" +"\n" +"memlevel controls the amount of memory used for internal compression state.\n" +"Valid values range from 1 to 9. Higher values result in higher memory usage,\n" +"faster compression, and smaller output.\n" +"\n" +"strategy is used to tune the compression algorithm. Possible values are\n" +"Z_DEFAULT_STRATEGY, Z_FILTERED, and Z_HUFFMAN_ONLY.\n" +"\n" +"zdict is the predefined compression dictionary - a sequence of bytes\n" +"containing subsequences that are likely to occur in the input data."); PyDoc_STRVAR(decompressobj__doc__, "decompressobj([wbits[, zdict]]) -- Return a decompressor object.\n" |