12. Data Compression and Archiving

#
12. Data Compression and Archiving

The modules described in this chapter support data compression with the zlib, gzip, and bzip2 algorithms, and the creation of ZIP- and tar-format archives.

`zlib` |  | Low-level interface to compression and decompression routines compatible with gzip.
`gzip` |  | Interfaces for gzip compression and decompression using file objects.
`bz2` |  | Interface to compression and decompression routines compatible with bzip2.
`zipfile` |  | Read and write ZIP-format archive files.
`tarfile` |  | Read and write tar-format archive files.