--- id: pyzstd version: "0.19.1" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # pyzstd — Support for Zstandard (zstd) compression License: permissive · Maintenance: active · Downloads: 8.5M/mo ## What it is and what it does pyzstd is a Python wrapper around the Zstandard compression library that mirrors the API of Python's built-in compression modules (bz2, lzma, zlib). It compresses and decompresses data using the zstd format, which offers fast compression with good compression ratios. Since version 0.19.0, it internally uses Python's native compression.zstd module when available. The package is now primarily a compatibility shim for projects that need zstd support on Python 3.10+. The maintainers recommend that new projects use Python's standard library compression.zstd directly, and existing projects consider migrating. It remains actively maintained and carries no known security vulnerabilities. Use it for: - Compress and decompress data in zstd format on Python 3.10+ where native support is available - Migrate legacy code from pyzstd to the standard library compression.zstd module - Work with seekable zstd streams or tar archives in zst format - Maintain compatibility with code written against the pyzstd API ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides Python bindings to the Zstandard (zstd) compression library with an API similar to bz2, lzma, and zlib modules. No for new projects—use Python's native compression.zstd module instead. Yes-with-conditions for existing codebases already using pyzstd that need to stay on Python 3.10+; the package is stable and actively maintained but the maintainers explicitly recommend migration to the standard library. ## Install pip install pyzstd uv add pyzstd poetry add pyzstd ## Installing pyzstd Before you install: Low install friction with a pure-wheel distribution. Actively maintained with recent commits and production-stable status. Internally delegates to Python's native compression.zstd since version 0.19.0, making it a compatibility layer for older Python versions. License in practice: BSD-3-Clause permissive license allows unrestricted commercial and private use with minimal obligations—suitable for most projects. Quickstart: pip install pyzstd import pyzstd compressed = pyzstd.compress(b'data') original = pyzstd.decompress(compressed) Requires Python 3.10 or later; for older Python versions, the package recommends using backports.zstd instead. Verify before relying: - Whether pyzstd offers performance advantages over direct use of compression.zstd in Python 3.10+ - Specific seekable stream or tar-related functionality beyond standard compress/decompress ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 8.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags zstandard compression python, zstd compression bindings, python zstd library, compress decompress zst, seekable compression format, zstandard file compression, compression, zstandard, compatibility-shim [View on SkillFed](https://skillfed.io/packages/pyzstd) · [View on PyPI](https://pypi.org/project/pyzstd/)