Zstandard Python Bindings
Python bindings for the Zstandard compression library, providing high compression ratios and fast decompression speeds. Current version: 0.25.0. Released on a regular basis with active maintenance.
Warnings
- breaking Support for Python 3.8 has been dropped; Python 3.9 is now the minimum supported version.
- deprecated The 'manylinux2010' wheel format is no longer supported; consider using 'manylinux2014' or 'manylinux2010' wheels.
Install
-
pip install zstandard
Imports
- ZstdCompressor
from zstandard import ZstdCompressor
Quickstart
import zstandard # Compress data compressor = zstandard.ZstdCompressor() compressed_data = compressor.compress(b'Hello, world!') # Decompress data decompressor = zstandard.ZstdDecompressor() decompressed_data = decompressor.decompress(compressed_data) print(decompressed_data.decode()) # Outputs: Hello, world!