Closed sharkinsspatial closed 5 months ago
If lzf_encode
and lzf_decode
are not used with header=True
, the output size has to be passed to lzf_decode
, for example lzf_decode(compressed_array, out=array.nbytes)
.
The error handling should be improved, including checking the errno
variable...
The next version will check errno
and raise LzfError: lzf_decompress detected the output buffer is not large enough to hold the decompressed data
in such cases. The default output buffer size is raised to 8 times the input size.
Fixed in imagecodecs 2024.9.22.
Environment
Python 3.11.8 liblzf 3.6 imagecodecs 2024.6.1
Expected Behavior
lzf_encode
andlzf_decode
can compress and decompress a numpy array.Actual Behavior
lzf_decode
throws an error with float dataExample Code
Returns