Skip to main content

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

Project description

PyPI Release Test Status
PyPI version Build status

Introduction

This is a fork of https://github.com/seung-lab/fpzip with changes to allow it to work with Python 3.11 and 3.12; it also has a different test and PyPI deployment system. We are grateful to William Silversmith for all of the hard work necessary to make this project in the first place.

This fork is maintained by the Ring-Moon Systems Node of NASA's Planetary Data System.

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.3.0). The version number for this package is independent. Python 3.7+ is 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 rms-fpzip

If we have a precompiled binary available the above command should just work. However, if you have to compile from source, 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 rms-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 or the fpzip Github page.

  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.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

rms_fpzip-1.2.9-cp312-cp312-win_amd64.whl (95.9 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

rms_fpzip-1.2.9-cp312-cp312-win32.whl (84.8 kB view hashes)

Uploaded CPython 3.12 Windows x86

rms_fpzip-1.2.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (945.6 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

rms_fpzip-1.2.9-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (913.8 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

rms_fpzip-1.2.9-cp312-cp312-macosx_10_9_x86_64.whl (126.7 kB view hashes)

Uploaded CPython 3.12 macOS 10.9+ x86-64

rms_fpzip-1.2.9-cp311-cp311-win_amd64.whl (97.2 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

rms_fpzip-1.2.9-cp311-cp311-win32.whl (85.4 kB view hashes)

Uploaded CPython 3.11 Windows x86

rms_fpzip-1.2.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (969.9 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

rms_fpzip-1.2.9-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (936.7 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

rms_fpzip-1.2.9-cp311-cp311-macosx_10_9_x86_64.whl (129.1 kB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

rms_fpzip-1.2.9-cp310-cp310-win_amd64.whl (97.8 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

rms_fpzip-1.2.9-cp310-cp310-win32.whl (86.0 kB view hashes)

Uploaded CPython 3.10 Windows x86

rms_fpzip-1.2.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (939.0 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

rms_fpzip-1.2.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (903.3 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

rms_fpzip-1.2.9-cp310-cp310-macosx_10_9_x86_64.whl (130.8 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

rms_fpzip-1.2.9-cp39-cp39-win_amd64.whl (98.8 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

rms_fpzip-1.2.9-cp39-cp39-win32.whl (86.9 kB view hashes)

Uploaded CPython 3.9 Windows x86

rms_fpzip-1.2.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (941.9 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

rms_fpzip-1.2.9-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (907.9 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

rms_fpzip-1.2.9-cp39-cp39-macosx_10_9_x86_64.whl (130.3 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

rms_fpzip-1.2.9-cp38-cp38-win_amd64.whl (98.9 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

rms_fpzip-1.2.9-cp38-cp38-win32.whl (86.7 kB view hashes)

Uploaded CPython 3.8 Windows x86

rms_fpzip-1.2.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (946.3 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

rms_fpzip-1.2.9-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (911.3 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

rms_fpzip-1.2.9-cp38-cp38-macosx_10_9_x86_64.whl (128.2 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

rms_fpzip-1.2.9-cp37-cp37m-win_amd64.whl (98.0 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

rms_fpzip-1.2.9-cp37-cp37m-win32.whl (85.7 kB view hashes)

Uploaded CPython 3.7m Windows x86

rms_fpzip-1.2.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (906.2 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

rms_fpzip-1.2.9-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (874.4 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

rms_fpzip-1.2.9-cp37-cp37m-macosx_10_9_x86_64.whl (129.0 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

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