fpzip
fpzip copied to clipboard
Cython bindings for fpzip, a floating point image compression algorithm.
First, a big thanks for making these fpzip wrappers available! Skimming the code and seeing user comments about the need to transpose arrays, I wanted to get to the root...
I believe the following line is causing two memory copies: ```python bytes_out = bytearray(bufviewf[:outbytes])[:outbytes] ``` If we instead return a bytes-like object that implements the buffer protocol we can save...
The fpzip algorithm can sometimes require a larger buffer than the input array size (pigeonhole principle). The extra 4 bytes in `header_bytes` was enough to _mostly_ hide this issue, but...