Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

ZSTD Bindings for Python

Project Description

Simple python bindings to Yann Collet ZSTD compression library

Zstd, short for Zstandard, is a new lossless compression algorithm,
which provides both good compression ratio _and_ speed for your standard compression needs. “Standard” translates into everyday situations which neither look for highest possible ratio (which LZMA and ZPAQ cover) nor extreme speeds (which LZ4 covers).

It is provided as a BSD-license package, hosted on GitHub.

WARNING!!!

If you setup 1.0.0.99.1 version - remove it manualy to able to update. PIP matching version strings not tuple of numbers.

Result generated by versions prior to 1.0.0.99.1 is not compatible with orignial Zstd by any means. It generates custom header and can be readed only by zstd python module.

As of 1.0.0.99.1 version it uses standard Zstd output, not modified.

To prevent data loss there is two functions now: `compress_old` and `decompress_old`. They are works just like in old versions prior to 1.0.0.99.1.

As of 1.1.4 version module build without them by default.

TODO

  • Support dictionary training. Current status is not supported.

Build from source

>>> git clone https://github.com/sergey-dryabzhinsky/python-zstd
>>> git submodule update --init
>>> apt-get install python-dev python3-dev python-setuptools python3-setuptools
>>> python setup.py build_ext clean
>>> python3 setup.py build_ext clean

Note: legacy format support disabled by default. To build with legacy support - pass --legacy option to setup.py script:

>>> python setup.py build_ext --legacy clean

If you want to build with existing distribution of libzstd just add --external option. But beware! Legacy formats support is unknown in this case.

>>> python setup.py build_ext --external clean

If paths to header file zstd.h and libraries is uncommon - use common build params: –libraries –include-dirs –library-dirs.

>>> python setup.py build_ext --external --include-dirs /opt/zstd/usr/include --libraries zstd --library-dirs /opt/zstd/lib clean

Install from pypi

>>> # for Python 2.6+
>>> pip install zstd
>>> # or for Python 3.2+
>>> pip3 install zstd
Release History

Release History

This version
History Node

1.3.1

History Node

1.3.0.2

History Node

1.2.0

History Node

1.1.4

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
zstd-1.3.1.tar.gz (1.2 MB) Copy SHA256 Checksum SHA256 Source Sep 2, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting