--- id: zipfile-zstd version: "0.0.4" license: unclear license_treatment: permissive maintenance: dormant --- # zipfile-zstd — Monkey patch the standard zipfile module to enable Zstandard support License: permissive · Maintenance: dormant · Downloads: 1.4M/mo ## What it is and what it does zipfile-zstd is a thin wrapper that monkey-patches Python's standard zipfile module to recognize and handle Zstandard (zstd) compression. When imported, it registers ZIP_ZSTANDARD as a valid compression method, allowing you to create and extract ZIP files using the zstd algorithm. The package delegates actual compression to zstandard, which provides bindings to libzstd. Typical use is a single import statement at the top of your code; after that, the standard zipfile API works transparently with zstd-compressed archives. The package supports both compression with configurable compression levels and decompression, but does not expose advanced zstd features like dictionaries or custom parameters. Use it for: - Create smaller, faster-compressing ZIP archives for distribution or backup when zstd's compression ratio is preferable to deflate. - Read ZIP files created by other tools or systems that use Zstandard compression. - Integrate zstd compression into existing Python code that already uses zipfile, with minimal refactoring. - Archive large files where zstd's speed-to-ratio trade-off offers better performance than standard compression methods. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Extends Python's standard zipfile module to read and write ZIP archives using Zstandard compression, via a monkey patch that registers the algorithm as a supported compression method. Yes, if you need Zstandard support in ZIP files and are comfortable with dormant maintenance. The package is simple, has no known vulnerabilities, and low install friction. However, do not rely on it for active development or expect updates if Python's zipfile module changes significantly; it is best suited for stable, self-contained use cases where zstd compression is a requirement. ## Install pip install zipfile-zstd uv add zipfile-zstd poetry add zipfile-zstd ## Installing zipfile-zstd Before you install: Low install friction; pure Python wheel with a single runtime dependency on zstandard. Maintenance is dormant—last release was 2021-12-08 and no commits since 2024-11-19—so expect no active support, but the codebase is small and unlikely to break with standard library changes. License in practice: MIT license (permissive); you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: pip install zipfile-zstd import zipfile_zstd as zipfile zf = zipfile.ZipFile('archive.zip', 'w', zipfile.ZIP_ZSTANDARD, compresslevel=19) zf.write('file.txt') zf.close() Requires zstandard package and Python 3.6 or later; dictionaries and advanced compression parameters are not supported. Verify before relying: - Compatibility with Python versions newer than 3.6 (e.g., 3.11+) is not explicitly tested in the fact sheet. - Performance characteristics and compression ratio compared to deflate or other algorithms. - Whether the monkey patch persists across module reloads or in multi-threaded contexts. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 1.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags zstandard zip compression, zipfile zstd support, zstd compressed archives, monkey patch zipfile, zstandard compression python, zip with zstd algorithm, compression, zstandard [View on SkillFed](https://skillfed.io/packages/zipfile-zstd) · [View on PyPI](https://pypi.org/project/zipfile-zstd/)