diff options
author | Cosimo Lupo <cosimo.lupo@daltonmaag.com> | 2015-10-05 18:57:32 +0100 |
---|---|---|
committer | Cosimo Lupo <cosimo.lupo@daltonmaag.com> | 2015-10-06 19:50:53 +0100 |
commit | 82ffc4df57c3fec94adb3dd4539d80c748e573e9 (patch) | |
tree | 2b93ffe02900f16af721d125e71ab1c06f6e3cc7 /python/bro.py | |
parent | c85bb508cb86eaac98a4667e67e944018f5abbf2 (diff) | |
download | brotli-82ffc4df57c3fec94adb3dd4539d80c748e573e9.zip brotli-82ffc4df57c3fec94adb3dd4539d80c748e573e9.tar.gz brotli-82ffc4df57c3fec94adb3dd4539d80c748e573e9.tar.bz2 |
[bro.py] set 'lgwin' valid range to [10..24]
Diffstat (limited to 'python/bro.py')
-rwxr-xr-x | python/bro.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/python/bro.py b/python/bro.py index 0f307fb..eae9b8f 100755 --- a/python/bro.py +++ b/python/bro.py @@ -46,7 +46,7 @@ def get_binary_stdio(stream): return orig_stdio.buffer -def main(): +def main(args=None): parser = argparse.ArgumentParser( prog='bro.py', @@ -63,7 +63,7 @@ def main(): params = parser.add_argument_group('optional encoder parameters') params.add_argument('-m', '--mode', metavar="MODE", type=int, choices=[0, 1], help='The compression mode can be 0 for generic input, ' - '1 for UTF-8 encoded text, or 2 for WOFF 2.0 font data.' + '1 for UTF-8 encoded text, or 2 for WOFF 2.0 font data. ' 'Defaults to 0.') params.add_argument('-q', '--quality', metavar="QUALITY", type=int, choices=list(range(0, 12)), @@ -73,7 +73,7 @@ def main(): params.add_argument('--lgwin', metavar="LGWIN", type=int, choices=list(range(16, 25)), help='Base 2 logarithm of the sliding window size. Range is ' - '16 to 24. Defaults to 22.') + '10 to 24. Defaults to 22.') params.add_argument('--lgblock', metavar="LGBLOCK", type=int, choices=[0] + list(range(16, 25)), help='Base 2 logarithm of the maximum input block size. ' @@ -82,7 +82,7 @@ def main(): # set default values using global DEFAULT_PARAMS dictionary parser.set_defaults(**DEFAULT_PARAMS) - options = parser.parse_args() + options = parser.parse_args(args=args) if options.infile: if not os.path.isfile(options.infile): |