Cython bindings for fpzip.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
fpzip-1.2.0
.gitignore
.travis.yml
AUTHORS
ChangeLog
MANIFEST.in
README.md
fpzip.cpp
fpzip.pyx
requirements.txt
setup.cfg
setup.py
test.py

README.md

Build Status PyPI version

fpzip

Python C++ bindings for the fpzip algorithm (version 1.2.0). The version number for this package is independent. Python 2.7 and Python 3+ are supported.

import fpzip
import numpy as np

data = np.array(..., dtype=np.float32) # 3d or 4d float or double array
compressed_bytes = fpzip.compress(data, precision=0) # b'...'
data_again = fpzip.decompress(compressed_bytes) # 3d or 4d float or double array

Installation

Requires C++ compiler.

pip Installation

Unfortunately, it's necessary to install numpy first because of a quirk in the Python installation procedure that won't easily recognize when a numpy installation completes in the same process. There are some hacks, but I haven't gotten them to work.

pip install numpy
pip install fpzip

Direct Installation

$ pip install numpy
$ python setup.py develop

References

Algorithm and C++ code by Peter Lindstrom and Martin Isenburg. Cython interface code by William Silversmith. Check out Dr. Lindstrom's site.

  1. Peter Lindstrom and Martin Isenburg, "Fast and Efficient Compression of Floating-Point Data," IEEE Transactions on Visualization and Computer Graphics, 12(5):1245-1250, September-October 2006, doi:10.1109/TVCG.2006.143.