GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Data Compression and Archiving
  • Report a bug
  • Improve this page
  • Show source
  • index
  • modules
  • next
  • Python
  • 3.16.0a2 documentation
  • The Python standard library
  • The compression package

This view

  • Original page
  • New address

GeezerVison is showing docs.python.org — The compression package

The compression package¶

Added in version 3.14.

The compression package contains the canonical compression modules containing interfaces to several different compression algorithms. Some of these modules have historically been available as separate modules; those will continue to be available under their original names for compatibility reasons, and will not be removed without a deprecation cycle. The use of modules in compression is encouraged where practical.

  • compression.bz2 – Re-exports bz2

  • compression.gzip – Re-exports gzip

  • compression.lzma – Re-exports lzma

  • compression.zlib – Re-exports zlib

  • compression.zstd – Wrapper for the Zstandard compression library

© Copyright 2001 Python Software Foundation.
This page is licensed under the Python Software Foundation License Version 2.
Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
See History and License for more information.

The Python Software Foundation is a non-profit corporation. Please donate.

Last updated on Nov 12, 2026 (17:37 UTC). Found a bug?
Created using Sphinx 9.1.1.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.