
Data Compression and Archiving
******************************

The modules described in this chapter support data compression with
the zlib, gzip, bzip2 and lzma algorithms, and the creation of ZIP-
and tar-format archives.  See also *Archiving operations* provided by
the ``shutil`` module.

* ``zlib`` --- Compression compatible with **gzip**
* ``gzip`` --- Support for **gzip** files
  * Examples of usage
* ``bz2`` --- Support for **bzip2** compression
  * (De)compression of files
  * Incremental (de)compression
  * One-shot (de)compression
* ``lzma`` --- Compression using the LZMA algorithm
  * Reading and writing compressed files
  * Compressing and decompressing data in memory
  * Miscellaneous
  * Specifying custom filter chains
  * Examples
* ``zipfile`` --- Work with ZIP archives
  * ZipFile Objects
  * PyZipFile Objects
  * ZipInfo Objects
* ``tarfile`` --- Read and write tar archive files
  * TarFile Objects
  * TarInfo Objects
  * Examples
  * Supported tar formats
  * Unicode issues