Skip to main content

Numpy wrapper for fpzip algorithm (P. Lindstrom & M. Isenburg, 2006)

Project description

Build Status PyPI version

fpzip

fpzip is a compression algorithm supporting lossless and lossy encoding for up to 4 dimensional floating point data. This package contains 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) # up to 4d float or double array
# Compress data losslessly, interpreting the underlying buffer in C (default) or F order.
compressed_bytes = fpzip.compress(data, precision=0, order='C') # returns byte string
# Back to 3d or 4d float or double array, decode as C (default) or F order.
data_again = fpzip.decompress(compressed_bytes, order='C') 

Installation

pip Binary Installation

pip install fpzip

If we have a precompiled binary available the above command should just work. However, if you have to compile from sounce, it's unfortunately 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 Source Installation

Requires C++ compiler.

pip install numpy
pip install fpzip

Direct Installation

Requires C++ compiler.

$ 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.

Project details


Download files

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

Files for fpzip, version 1.1.4
Filename, size File type Python version Upload date Hashes
Filename, size fpzip-1.1.4-cp27-cp27m-macosx_10_14_intel.whl (114.1 kB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size fpzip-1.1.4-cp27-cp27m-manylinux1_x86_64.whl (715.6 kB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size fpzip-1.1.4-cp35-cp35m-macosx_10_6_intel.whl (249.6 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size fpzip-1.1.4-cp35-cp35m-manylinux1_x86_64.whl (719.8 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size fpzip-1.1.4-cp36-cp36m-manylinux1_x86_64.whl (730.1 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size fpzip-1.1.4-cp36-cp36m-win_amd64.whl (124.8 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size fpzip-1.1.4-cp37-cp37m-macosx_10_9_x86_64.whl (127.4 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size fpzip-1.1.4-cp37-cp37m-manylinux1_x86_64.whl (730.0 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size fpzip-1.1.4-cp37-cp37m-win_amd64.whl (124.8 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size fpzip-1.1.4-cp38-cp38-macosx_10_9_x86_64.whl (131.1 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size fpzip-1.1.4-cp38-cp38-manylinux1_x86_64.whl (739.9 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size fpzip-1.1.4-cp38-cp38-win_amd64.whl (116.8 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size fpzip-1.1.4.tar.gz (855.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page