Skip to main content

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

Project description

[![Build Status](https://travis-ci.org/seung-lab/fpzip.svg?branch=master)](https://travis-ci.org/seung-lab/fpzip) [![PyPI version](https://badge.fury.io/py/fpzip.svg)](https://badge.fury.io/py/fpzip)

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

```python
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'...'
# Back to 3d or 4d float or double array, decode as C (default) or F order.
data_again = fpzip.decompress(compressed_bytes, order='F')
```

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

```bash
pip install numpy
pip install fpzip
```

Direct Installation

```bash
$ 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](https://computation.llnl.gov/projects/floating-point-compression).

1. Peter Lindstrom and Martin Isenburg, "[Fast and Efficient Compression of Floating-Point Data,](https://www.researchgate.net/publication/6715625_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](http://dx.doi.org/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.

Filename, size & hash SHA256 hash help File type Python version Upload date
fpzip-1.1.2-cp27-cp27m-macosx_10_14_intel.whl (113.3 kB) Copy SHA256 hash SHA256 Wheel cp27
fpzip-1.1.2-cp27-cp27m-manylinux1_x86_64.whl (707.6 kB) Copy SHA256 hash SHA256 Wheel cp27
fpzip-1.1.2-cp34-cp34m-manylinux1_x86_64.whl (711.9 kB) Copy SHA256 hash SHA256 Wheel cp34
fpzip-1.1.2-cp35-cp35m-manylinux1_x86_64.whl (705.5 kB) Copy SHA256 hash SHA256 Wheel cp35
fpzip-1.1.2-cp35-cp35m-win_amd64.whl (103.8 kB) Copy SHA256 hash SHA256 Wheel cp35
fpzip-1.1.2-cp36-cp36m-macosx_10_13_x86_64.whl (121.6 kB) Copy SHA256 hash SHA256 Wheel cp36
fpzip-1.1.2-cp36-cp36m-manylinux1_x86_64.whl (712.9 kB) Copy SHA256 hash SHA256 Wheel cp36
fpzip-1.1.2-cp37-cp37m-manylinux1_x86_64.whl (710.1 kB) Copy SHA256 hash SHA256 Wheel cp37
fpzip-1.1.2-cp37-cp37m-win_amd64.whl (102.9 kB) Copy SHA256 hash SHA256 Wheel cp37
fpzip-1.1.2.tar.gz (849.4 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page