Skip to content

bpo-34913: Document gzip command line interface #9782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions Doc/library/gzip.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,38 @@ Example of how to GZIP compress a binary string::
The basic data compression module needed to support the :program:`gzip` file
format.

Command Line Interface
----------------------

The :mod:`gzip` module provides a simple command line interface to compress or
decompress files.

Once executed the :mod:`gzip` module keeps the input file(s).

.. versionchanged:: 3.8

Add a new command line interface with a usage.

Command line options
^^^^^^^^^^^^^^^^^^^^

.. cmdoption:: file

.. code-block:: shell-session

$ python -m gzip file

If *file* is not specified, read from :attr:`sys.stdin`.

.. cmdoption:: -d, --decompress

Decompress the given file

.. code-block:: shell-session

$ python -m gzip -d file.gz

.. cmdoption:: -h, --help

Show the help message.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add documentation about the new command line interface of the gzip module.