bz2
Stdlib — CompressionPython 2.0+Intermediate
Read and write bzip2-compressed files
Quick Info
- Documentation
- Official Docs
- Python Version
- 2.0+
- Dependencies
- None — Python Standard Library
- Install
Included with Python
Learn by Difficulty
Quick Example
python
import bz2 print(f"Module: bz2") print(f"Contents: {dir(bz2)[:10]}")
The bz2 module is part of Python's standard library. Read and write bzip2-compressed files.
Try in PlaygroundTags
stdlibcompressionarchive