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).
# 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
Release history Release notifications | RSS feed
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.2.tar.gz
(849.4 kB
view hashes)
Built Distributions
fpzip-1.1.2-cp37-cp37m-win_amd64.whl
(102.9 kB
view hashes)
fpzip-1.1.2-cp35-cp35m-win_amd64.whl
(103.8 kB
view hashes)
Close
Hashes for fpzip-1.1.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ea3de496164dc8ac00cd0afdf0a4a2a89b380bb5b417955b0c7dfceb1ba9ff9 |
|
MD5 | a64fca439a73bdb024691556b7f13717 |
|
BLAKE2b-256 | 13b35525495840143d63f1f38b0483c7809acb731a6e2feb2853064fdff04716 |
Close
Hashes for fpzip-1.1.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a409a0a4bf48916214f9f0610e8e7705e78086a40b5faaea34192c699286b1c9 |
|
MD5 | 2bba68feb26ee66c56bc3acfe611d678 |
|
BLAKE2b-256 | 17322ef001ef87b6890b187ea28ba58b3de32cc689822216bcc80abdcf09c221 |
Close
Hashes for fpzip-1.1.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | add2de3faf8f26b9b139a4e95f96d4a8b4a9787783adfbb6c020e47cd590a066 |
|
MD5 | a719a13128a272e4ffe29723d035f8a0 |
|
BLAKE2b-256 | db1321b4df0ec1ad0fa5f964656b8691e05ab2376d1e52b7cc90ef257b579d53 |
Close
Hashes for fpzip-1.1.2-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b05cc42f1ed40f59e263d269976177d91a651a4e28e576385c7c8ac73c53271a |
|
MD5 | 356fd0a4d85c82c0ad07f9f05235c2fb |
|
BLAKE2b-256 | 024964a930ad6d629025db45d029d8048679113b3aff0d5c5c0c139810e98ae7 |
Close
Hashes for fpzip-1.1.2-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 192180915ede3dcdd1eb39548561efe122840a6d594cd43712356c70be2a0b5a |
|
MD5 | 05d8b5c8a12807275ad788ba19d9e558 |
|
BLAKE2b-256 | c0a8cd3a5f82b2152ba89f095824e8f8d2c5392e9e154e84f9dd4886c7171748 |
Close
Hashes for fpzip-1.1.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f64675fc079408b64c110d41c24683991b4be5aae0ca72a2cf7f0e29a2e9f94 |
|
MD5 | 3f9aa824e4a696194a4611a0ff6b0479 |
|
BLAKE2b-256 | 611b637e0eaa0b0cdf88ce6c805118dff539844e9bf7b7a228b357fc69c1d61b |
Close
Hashes for fpzip-1.1.2-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 348b7bb1e28fce912c23d6f935600727de20bf49f720dec8e57454c89ce7bd18 |
|
MD5 | 01b6844d4e1b1d6806117a8360e34948 |
|
BLAKE2b-256 | f26d0071644e9269d3715f9e4a1ec2a22f1eeec8301eeac3c0569f1ea3bd44c0 |
Close
Hashes for fpzip-1.1.2-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6428c02d822737dd50c670ec68d9a369d0a1061641b2728391c30456db3963d |
|
MD5 | 7db7d0b9adda35e66712425791600206 |
|
BLAKE2b-256 | f46197469f605e4c52cbb8d51b4838cd5dad41ba1cc17602b25fbc9f7073f12d |
Close
Hashes for fpzip-1.1.2-cp27-cp27m-macosx_10_14_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a9a719328bd2b241dbebc82d67770b6a94be8904062ab55615d879084e813e1 |
|
MD5 | 43b51d630ec2f8f18051fe3087fcc137 |
|
BLAKE2b-256 | e3a3c83b74ed108986abc4d60c8fabbe7176d15c9058d9d42294fecdf8efd7b3 |