• Home
  • Raw
  • Download

Lines Matching full:gzip

1 :mod:`gzip` --- Support for :program:`gzip` files
4 .. module:: gzip
5 :synopsis: Interfaces for gzip compression and decompression using file objects.
7 **Source code:** :source:`Lib/gzip.py`
12 like the GNU programs :program:`gzip` and :program:`gunzip` would.
16 The :mod:`gzip` module provides the :class:`GzipFile` class, as well as the
18 The :class:`GzipFile` class reads and writes :program:`gzip`\ -format files,
23 :program:`gzip` and :program:`gunzip` programs, such as those produced by
31 Open a gzip-compressed file in binary or text mode, returning a :term:`file
64 An exception raised for invalid gzip files. It inherits :exc:`OSError`.
65 :exc:`EOFError` and :exc:`zlib.error` can also be raised for invalid gzip
83 included in the :program:`gzip` file header, which may include the original
140 All :program:`gzip` compressed streams are required to contain this
148 The path to the gzip file on disk, as a :class:`str` or :class:`bytes`.
199 gzip data (multiple gzip blocks concatenated together). When the data is
215 import gzip
216 with gzip.open('/home/joe/file.txt.gz', 'rb') as f:
219 Example of how to create a compressed GZIP file::
221 import gzip
223 with gzip.open('/home/joe/file.txt.gz', 'wb') as f:
226 Example of how to GZIP compress an existing file::
228 import gzip
231 with gzip.open('/home/joe/file.txt.gz', 'wb') as f_out:
234 Example of how to GZIP compress a binary string::
236 import gzip
238 s_out = gzip.compress(s_in)
243 The basic data compression module needed to support the :program:`gzip` file
247 .. program:: gzip
252 The :mod:`gzip` module provides a simple command line interface to compress or
255 Once executed the :mod:`gzip` module keeps the input file(s).