You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The result of compression and decompression with
filters=[blosc2.Filter.SHUFFLE, blosc2.Filter.BYTEDELTA]
for some lengths not divisible by 8 bytes
is not equvivalent: the last byte is differs
To Reproduce
import blosc2
import numpy as np
dtype = np.float32
for N in range(100,270):
x = np.random.rand(N).astype(dtype)
kw=dict(
clevel=5,
# filters=[blosc2.Filter.SHUFFLE], # correct
# filters=[blosc2.Filter.BYTEDELTA], # correct
# filters=[blosc2.Filter.BYTEDELTA, blosc2.Filter.SHUFFLE], # correct
filters=[blosc2.Filter.SHUFFLE, blosc2.Filter.BYTEDELTA], # uncorrect !
)
y = np.frombuffer( blosc2.decompress2 (blosc2.compress2(np.frombuffer(x, dtype=np.uint8).copy(order='C'), codec=blosc2.Codec.ZSTD, **kw)), dtype=dtype)
#y = np.frombuffer( np.frombuffer(x, dtype=np.uint8), dtype=dtype)
if y[-1]-x[-1] != 0:
print(f"{N=} {y[-1]-x[-1]}")
Describe the bug
The result of compression and decompression with
filters=[blosc2.Filter.SHUFFLE, blosc2.Filter.BYTEDELTA]
for some lengths not divisible by 8 bytes
is not equvivalent: the last byte is differs
To Reproduce
output:
Expected behavior
Empty output
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: