pyzfp
Python wrapper over the zfp compression library. This is the second version, rewritten using Cython because the earlier version using ctypes was slow. Click here for performance comparison. Currently wraps zfp version 0.5.5.
Installation
pip install pyzfp
This should download zfp version 0.5.5, compile it and install the python (Cython) wrappers in the default install location. The use of a virtual environment is recommended.
Should you face any issues, please report them using Github issues.
Usage
A sample program that demonstrates the use of the library: (also contents of test.py):
from pyzfp import compress, decompress
a = np.linspace(0, 100, num=1000000).reshape((100, 100, 100))
tolerance = 0.0000001
parallel = True
compressed = compress(a, tolerance=tolerance, parallel=parallel)
recovered = decompress(compressed, a.shape, a.dtype, tolerance=tolerance)
print(len(a.tostring()))
print(len(compressed))
print(np.linalg.norm(recovered-a))
Metadata
Release files for pyzfp 0.5.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyzfp-0.5.5.tar.gz | 257.6 kB | Details |
Release files / pyzfp-0.5.5.tar.gz
| Download URL | pyzfp-0.5.5.tar.gz |
|---|---|
| Size | 257.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
530aacd023e377c36741f07a4f9079a6d997fa94fc5fe05326894a88b8b65bf3
|
|
BLAKE2b-256 checksum How to use checksums |
ca56b736d3e9aa9bbcca7efcb17f7ff24745b5c75f8d1505760bc21440ec4241
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
|