%global _empty_manifest_terminate_build 0 Name: python-fpzip Version: 1.2.1 Release: 1 Summary: Numpy wrapper for fpzip algorithm (P. Lindstrom & M. Isenburg, 2006) License: None URL: https://github.com/seung-lab/fpzip/ Source0: https://mirrors.nju.edu.cn/pypi/web/packages/dd/55/ef3936a4cd19992be7ef8baec33efcca52151df085d6e1801246ef8d9ebc/fpzip-1.2.1.tar.gz Requires: python3-numpy %description [![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.3.0). The version number for this package is independent. Python 3.7+ is 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://computing.llnl.gov/projects/fpzip) or the [fpzip Github page](https://github.com/LLNL/fpzip). 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). %package -n python3-fpzip Summary: Numpy wrapper for fpzip algorithm (P. Lindstrom & M. Isenburg, 2006) Provides: python-fpzip BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip BuildRequires: python3-cffi BuildRequires: gcc BuildRequires: gdb %description -n python3-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.3.0). The version number for this package is independent. Python 3.7+ is 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://computing.llnl.gov/projects/fpzip) or the [fpzip Github page](https://github.com/LLNL/fpzip). 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). %package help Summary: Development documents and examples for fpzip Provides: python3-fpzip-doc %description help [![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.3.0). The version number for this package is independent. Python 3.7+ is 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://computing.llnl.gov/projects/fpzip) or the [fpzip Github page](https://github.com/LLNL/fpzip). 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). %prep %autosetup -n fpzip-1.2.1 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-fpzip -f filelist.lst %dir %{python3_sitearch}/* %files help -f doclist.lst %{_docdir}/* %changelog * Thu Jun 08 2023 Python_Bot - 1.2.1-1 - Package Spec generated