--- id: zstd version: "1.5.7.2" license: BSD license_treatment: permissive maintenance: active --- # zstd — ZSTD Bindings for Python License: permissive · Maintenance: active · Downloads: 9.5M/mo ## What it is and what it does Zstd is a Python wrapper around Yann Collet's Zstandard compression library, a modern lossless compression algorithm that balances compression ratio and speed for everyday use. It sits between extremes like LZMA (highest ratio) and LZ4 (extreme speed), making it suitable for general-purpose compression tasks. The package provides simple, direct bindings to compress and decompress data. It has no runtime dependencies and works across Python 2.7 and modern Python 3 versions (3.4 through 3.14) on multiple platforms. Building from source requires libzstd development files and a C99-capable compiler; prebuilt wheels are available for most common configurations. The package is intentionally kept simple—dictionary and streaming support are not planned. Use it for: - Compress data for storage or transmission when you need better speed than LZMA but better ratio than LZ4. - Replace gzip or bzip2 compression in existing pipelines where Zstd's performance profile is beneficial. - Compress Python objects or serialized data in applications requiring fast, standard-compatible compression. - Build tools or utilities that need lossless compression without external command-line dependencies. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides Python bindings to the Zstandard (Zstd) compression library, enabling compression and decompression of data using the Zstd algorithm. Yes, if you need Zstd compression in Python and can meet the build dependencies (libzstd 1.4.0+, C99 compiler). The package is actively maintained, has no known vulnerabilities, and prebuilt wheels cover most platforms. No if you require streaming or dictionary support—the description explicitly notes these are not planned. ## Install pip install zstd uv add zstd poetry add zstd ## Installing zstd Before you install: Medium install friction due to compiled C extension requiring libzstd development files (version 1.4.0 or later) and a C99-capable compiler. Repository is actively maintained with recent commits, though the last release was 417 days ago. License in practice: BSD license (permissive) places no significant restrictions on use, modification, or distribution in most contexts. Quickstart: import zstd data = b'hello world' compressed = zstd.compress(data) decompressed = zstd.decompress(compressed) Requires libzstd development files (version 1.4.0+) and a C99-capable compiler (gcc >= 4.8) to build from source; prebuilt wheels available for many Python versions and platforms. Verify before relying: - Whether prebuilt wheels are available for your specific Python version and platform combination. - Performance characteristics compared to alternative compression libraries in your use case. - Current state of dictionary and streaming support, as the description notes these are not planned but may have changed. ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: medium - Maintenance: active - Downloads: 9.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags zstd compression python, zstandard bindings, compress decompress zstd, python zstd library, lossless compression zstandard, compression, c-extension [View on SkillFed](https://skillfed.io/packages/zstd) · [View on PyPI](https://pypi.org/project/zstd/)