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

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.

```python
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

```bash
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.*

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

#### Direct Installation

*Requires C++ compiler.*

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

Source Distribution

fpzip-1.1.3.tar.gz (857.1 kB view details)

Uploaded Source

Built Distributions

fpzip-1.1.3-cp37-cp37m-manylinux1_x86_64.whl (730.9 kB view details)

Uploaded CPython 3.7m

fpzip-1.1.3-cp36-cp36m-manylinux1_x86_64.whl (729.2 kB view details)

Uploaded CPython 3.6m

fpzip-1.1.3-cp36-cp36m-macosx_10_13_x86_64.whl (129.7 kB view details)

Uploaded CPython 3.6m macOS 10.13+ x86-64

fpzip-1.1.3-cp35-cp35m-manylinux1_x86_64.whl (720.7 kB view details)

Uploaded CPython 3.5m

fpzip-1.1.3-cp27-cp27m-manylinux1_x86_64.whl (715.7 kB view details)

Uploaded CPython 2.7m

fpzip-1.1.3-cp27-cp27m-macosx_10_14_intel.whl (114.3 kB view details)

Uploaded CPython 2.7m macOS 10.14+ intel

File details

Details for the file fpzip-1.1.3.tar.gz.

File metadata

  • Download URL: fpzip-1.1.3.tar.gz
  • Upload date:
  • Size: 857.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for fpzip-1.1.3.tar.gz
Algorithm Hash digest
SHA256 e9b7b669e5dd036ad280f9601b11cd6d64dfab818ab6e491cd5e495e5e2914fd
MD5 8ef94b61506b8f255c07fa91bf507aa0
BLAKE2b-256 e4e83697bb5e1ee3ef27e5c46f657833b95053bc245450ba334a288a0bc37c9c

See more details on using hashes here.

File details

Details for the file fpzip-1.1.3-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: fpzip-1.1.3-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 730.9 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for fpzip-1.1.3-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c93276409ff0076d529371de708fc30c6019c7933341d4939d7a39ac2f227def
MD5 601d80c85d394ee0df83d8190c0a04c1
BLAKE2b-256 f14110a382cf26bc50a1cc3354275724edfe84ced06097df9adc9f64949d379c

See more details on using hashes here.

File details

Details for the file fpzip-1.1.3-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: fpzip-1.1.3-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 729.2 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for fpzip-1.1.3-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 312fd1cfcb7ab37753bcaf216fccdd9823922435f9d43ae990ac49d57cc93bd8
MD5 81d06c901fa91baf537c37de25eb4946
BLAKE2b-256 79ca783b730b363c09b1441d98e6bdbf880c58b60f2efb64a7ec7ab043803930

See more details on using hashes here.

File details

Details for the file fpzip-1.1.3-cp36-cp36m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: fpzip-1.1.3-cp36-cp36m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 129.7 kB
  • Tags: CPython 3.6m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for fpzip-1.1.3-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 574defed2898a73605251fa355d61d593036be1526906c50958090bcba3609c9
MD5 645aace4f6f56f5ac97232e02da876b7
BLAKE2b-256 75ed5ac14c05b41147730d1493c9d320263c2e7339c372cf13fa1c8abd2c55a5

See more details on using hashes here.

File details

Details for the file fpzip-1.1.3-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: fpzip-1.1.3-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 720.7 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for fpzip-1.1.3-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 3b52ad25273459432c7978cea5ced0bb9c19233a1423cc9bde881e6fab3bc087
MD5 cc2fc9dfe49ea0fb7ffd60283289a45e
BLAKE2b-256 9176c38c325c817aa741ff21c439a72094c7cfe8ba9d0f7a902332be164c96fe

See more details on using hashes here.

File details

Details for the file fpzip-1.1.3-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

  • Download URL: fpzip-1.1.3-cp27-cp27m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 715.7 kB
  • Tags: CPython 2.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for fpzip-1.1.3-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 233ce9a2901089fc838ebf94593160d638774166ec0c71255f1fcf9d02b27e36
MD5 4f85a88b235708d322beb8bd23c8d19b
BLAKE2b-256 25d045200255fab5c33ce430a960a3acd0abb5fda80be4ced318eddc8ccb2dd5

See more details on using hashes here.

File details

Details for the file fpzip-1.1.3-cp27-cp27m-macosx_10_14_intel.whl.

File metadata

  • Download URL: fpzip-1.1.3-cp27-cp27m-macosx_10_14_intel.whl
  • Upload date:
  • Size: 114.3 kB
  • Tags: CPython 2.7m, macOS 10.14+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/2.7.10

File hashes

Hashes for fpzip-1.1.3-cp27-cp27m-macosx_10_14_intel.whl
Algorithm Hash digest
SHA256 b37fbcbdbfedc28be69ee5a14ae711a3badddbf002fb575fae78412dd86d553a
MD5 e20a09af23235616851f1238264ebc91
BLAKE2b-256 6d20a4becbd4e3fe264bec79cad38a0af16f5d80d8072a1baecc8b290b456962

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page