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.1.tar.gz
(850.5 kB
view details)
File details
Details for the file fpzip-1.1.1.tar.gz
.
File metadata
- Download URL: fpzip-1.1.1.tar.gz
- Upload date:
- Size: 850.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32827c0f9d84071c3a64332c47300506e3f32ea10327b8f24eeb6d4a17725834 |
|
MD5 | 2b6fe399dc399c10180547632a04abfa |
|
BLAKE2b-256 | fb7956a8b9fdae7e962e1120bafd7896204bb6457386fc0c0ff7f1f259be6501 |