Dokumen ini untuk versi lama Python yang tidak didukung lagi. Anda harus memutakhirkan, dan membaca Dokumentasi Python untuk rilis stabil saat ini.

# Kompresi Data dan Pengarsipan

Modul yang dijelaskan dalam bab ini mendukung kompresi data dengan algoritma zlib, gzip, bzip2 dan lzma, dan pembuatan arsip format-ZIP dan tar. Lihat juga Archiving operations yang disediakan oleh modul `shutil`.

- `zlib` --- Compression compatible with gzip
- `gzip` --- Support for gzip files
  - Examples of usage
  - Command Line Interface
    - Command line options
- `bz2` --- Support for bzip2 compression
  - (De)compression of files
  - Incremental (de)compression
  - One-shot (de)compression
  - Examples of usage
- `lzma` --- Compression using the LZMA algorithm
  - Reading and writing compressed files
  - Compressing and decompressing data in memory
  - Miscellaneous
  - Specifying custom filter chains
  - Contoh-contoh
- `zipfile` --- Work with ZIP archives
  - Objek ZipFile
  - Objek Jalur, Path
  - Objek PyZipFile
  - Objek ZipInfo
  - Command-Line Interface
    - Command-line options
  - Decompression pitfalls
    - From file itself
    - File System limitations
    - Resources limitations
    - Interupsi
    - Default behaviors of extraction
- `tarfile` --- Read and write tar archive files
  - Objek TarFile
  - Objek TarInfo
  - Extraction filters
    - Default named filters
    - Filter errors
    - Hints for further verification
    - Supporting older Python versions
    - Stateful extraction filter example
  - Command-Line Interface
    - Command-line options
  - Contoh-contoh
  - Supported tar formats
  - Unicode issues