bz2 — Support for bzip2 compression — Python 3.14.7 documentation

docs.python.org

Tin mới

gzip — Support for gzip files

lzma — Compression using the LZMA algorithm

Python Module Index

3.14.7 Documentation

The Python Standard Library

Data Compression and Archiving

(De)compression of files¶

This module provides a comprehensive interface for compressing and decompressing data using the bzip2 compression algorithm.

Requirements for optional modules

This module provides a comprehensive interface for compressing and decompressing data using the bzip2 compression algorithm.

io.BufferedIOBase.detach

If filename is a str or bytes object, open the named file directly. Otherwise, filename should be a file object, which will be used to read or write the compressed data.