bz2file
Read and write bzip2-compressed files.
Decision gist · record as of 2026-08-14
No. The package is abandoned, receives no maintenance or security updates, and has high install friction. Unless you are specifically supporting Python 2.6, 2.7, or 3.0 through 3.4 (all end-of-life), use the built-in bz2 module instead.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Package is abandoned and untested on modern Python versions; compatibility beyond 3.4 is unverified.
- High install friction due to source distribution format.
- Package is abandoned—last release was 2014-01-19 and last commit 2020-07-18—so no active maintenance or security updates are forthcoming.
License · maintenance · safety
Apache License, Version 2.0 (permissive) — Licensed under Apache License, Version 2.0 (permissive), so commercial and private use are permitted without restriction.
last release 2014-01-19 (4590 days) · last repo commit 2020-07-18 · 17 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 326,812 downloads/mo, #7,572 on PyPI
Alternatives
Verify before relying
pip install bz2file
import bz2file
with bz2file.open('file.bz2', 'rb') as f:
data = f.read()- Whether the package works reliably on modern Python versions, given its abandonment and age.
- Whether multi-stream bzip2 support is actually needed for your use case, or if the standard library bz2 suffices.
- Current compatibility with Python versions released after 3.4.
What it is and what it does
Bz2file is a bzip2 file handler for Python that mimics the interface of the standard library's bz2 module. It was designed to backport newer bz2 features (like multi-stream support and additional I/O methods) to older Python versions that lacked them. The package reads and writes bzip2-compressed files, supports both text and binary modes, and can work with any file-like object.
The package is now abandoned and has not been updated since 2014-01-19. It remains in the top 15000 PyPI packages by download count, but that reflects historical usage rather than active adoption. High install friction and lack of maintenance make it a poor choice for new projects.
Use it for
- Decompress multi-stream bzip2 files on Python versions where the standard bz2 module lacks that support.
- Use peek() or read1() methods for incremental bzip2 decompression when the standard library interface is insufficient.
- Maintain legacy code written for older Python versions that relied on bz2file's extended interface.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
The package is abandoned, receives no maintenance or security updates, and has high install friction. Unless you are specifically supporting Python 2.6, 2.7, or 3.0 through 3.4 (all end-of-life), use the built-in bz2 module instead.
Install
bz2file on PyPI
Before you install
High install friction due to source distribution format. Package is abandoned—last release was 2014-01-19 and last commit 2020-07-18—so no active maintenance or security updates are forthcoming.
Package is abandoned and untested on modern Python versions; compatibility beyond 3.4 is unverified.
License in practice
Licensed under Apache License, Version 2.0 (permissive), so commercial and private use are permitted without restriction.
Quickstart
pip install bz2file
import bz2file
with bz2file.open('file.bz2', 'rb') as f:
data = f.read()
Verify before relying
- Whether the package works reliably on modern Python versions, given its abandonment and age.
- Whether multi-stream bzip2 support is actually needed for your use case, or if the standard library bz2 suffices.
- Current compatibility with Python versions released after 3.4.
Package facts
| License | Apache License, Version 2.0 permissive |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Abandoned 4,590 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 326,812 / month, #7,572 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.0Programming Language :: Python :: 3.1Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Topic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Archiving :: Compression |
Evidence: bz2file-0.98.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “bzip2 file compression”
- bz2fileProvides a drop-in replacement for Python's standard library bz2…
- xopenxopen provides a drop-in replacement for Python's built-in open()…
- stream-unzipStreams unzip operations on ZIP archives without loading entire files…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also xopen · compress-pickle · in-place · lz4 · zlib-ng · pyppmd · pyzstd · stream-unzip · indexed-gzip · mgzip