diff options
author | Cosimo Lupo <cosimo.lupo@daltonmaag.com> | 2015-05-08 12:02:08 +0100 |
---|---|---|
committer | Cosimo Lupo <cosimo.lupo@daltonmaag.com> | 2015-05-11 10:39:20 +0100 |
commit | 4c1d06931ecf3ec063fa4ab820bb2d102413a01c (patch) | |
tree | 58571bda82ad73708e2b5100327b27285cf23463 /python | |
parent | 6264bea2e49db2991cc4d5e3eef89c27c19289d5 (diff) | |
download | brotli-4c1d06931ecf3ec063fa4ab820bb2d102413a01c.zip brotli-4c1d06931ecf3ec063fa4ab820bb2d102413a01c.tar.gz brotli-4c1d06931ecf3ec063fa4ab820bb2d102413a01c.tar.bz2 |
[brotlimodule] add new keyword params docstring of brotli.compress
Diffstat (limited to 'python')
-rw-r--r-- | python/brotlimodule.cc | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/python/brotlimodule.cc b/python/brotlimodule.cc index f843d1e..79e48c6 100644 --- a/python/brotlimodule.cc +++ b/python/brotlimodule.cc @@ -30,19 +30,30 @@ static int mode_convertor(PyObject *o, BrotliParams::Mode *mode) { } PyDoc_STRVAR(compress__doc__, -"compress(data[, mode=MODE_TEXT, enable_transforms=False])\n" +"compress(data, mode=MODE_TEXT, quality=11, lgwin=22, lgblock=0,\n" +" enable_dictionary=True, enable_transforms=False\n" +" greedy_block_split=False, enable_context_modeling=True)\n" "\n" "Args:\n" " data (bytes): The input data.\n" " mode (int, optional): The compression mode can be MODE_TEXT (default) or\n" " MODE_FONT.\n" -" enable_dictionary (bool, optional): Controls whether to enable encoder\n" -" dictionary. Defaults to True. Respected only if quality > 9.\n" -" enable_transforms (bool, optional): Controls whether to enable encoder\n" -" transforms. Defaults to False. Respected only if quality > 9.\n" -" greedy_block_split (bool, optional): Controls whether to enable a faster\n" -" but less dense compression mode. Defaults to False. Respected only if\n" -" quality > 9.\n" +" quality (int, optional): Controls the compression-speed vs compression-\n" +" density tradeoff. The higher the quality, the slower the compression.\n" +" Range is 0 to 11. Defaults to 11.\n" +" lgwin (int, optional): Base 2 logarithm of the sliding window size. Range\n" +" is 16 to 24. Defaults to 22.\n" +" lgblock (int, optional): Base 2 logarithm of the maximum input block size.\n" +" Range is 16 to 24. If set to 0, the value will be set based on the\n" +" quality. Defaults to 0.\n" +" enable_dictionary (bool, optional): Enables encoder dictionary. Defaults to\n" +" True. Respected only if quality > 9.\n" +" enable_transforms (bool, optional): Enable encoder transforms. Defaults to\n" +" False. Respected only if quality > 9.\n" +" greedy_block_split (bool, optional): Enables a faster but less dense\n" +" compression mode. Defaults to False. Respected only if quality > 9.\n" +" enable_context_modeling (bool, optional): Controls whether to enable context\n" +" modeling. Defaults to True. Respected only if quality > 9.\n" "\n" "Returns:\n" " The compressed string of bytes.\n" |