bpo-34969: Add --fast, --best on the gzip CLI (GH-9833)

This commit is contained in:
Stéphane Wirtel 2018-11-03 16:24:23 +01:00 committed by Julien Palard
parent fe62d877e3
commit 3e28eed9ec
4 changed files with 65 additions and 16 deletions

View file

@ -222,25 +222,26 @@ Once executed the :mod:`gzip` module keeps the input file(s).
.. versionchanged:: 3.8
Add a new command line interface with a usage.
By default, when you will execute the CLI, the default compression level is 6.
Command line options
^^^^^^^^^^^^^^^^^^^^
.. cmdoption:: file
.. code-block:: shell-session
$ python -m gzip file
If *file* is not specified, read from :attr:`sys.stdin`.
.. cmdoption:: --fast
Indicates the fastest compression method (less compression).
.. cmdoption:: --best
Indicates the slowest compression method (best compression).
.. cmdoption:: -d, --decompress
Decompress the given file
.. code-block:: shell-session
$ python -m gzip -d file.gz
Decompress the given file.
.. cmdoption:: -h, --help