Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sz using ctypes #422

Closed
wants to merge 16 commits into from
Prev Previous commit
Next Next commit
one type
martindurant committed Mar 6, 2023
commit 834b28f59e6dda3fce92d46d5b11705c8c904795
2 changes: 1 addition & 1 deletion numcodecs/sz.py
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ def decode(self, buf, out=None):
buf = memoryview(buf)
param = Params(self.mask, self.bits_per_pixel, self.pix_per_block, self.pix_per_scanline)
lout = int.from_bytes(buf[:4], "little")
dest_len = ctypes.c_int(lout)
dest_len = ctypes.c_size_t(lout)
p_dest_len = ctypes.pointer(dest_len)
if out is None:
out = ctypes.create_string_buffer(lout)