-
Notifications
You must be signed in to change notification settings - Fork 158
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
replace bytes of compressed stream with uint8_t #106
Changes from 20 commits
2361be0
3479dd7
b737a9b
14131c3
470b0f5
ebd227e
d87759c
01a5a97
0a730b8
c1e444e
07022fd
0f74a36
b3bc658
219f0ce
b4c96fb
1a65860
f084835
bd0e413
0583611
fdde60b
f1709a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,12 +59,16 @@ def test_advanced_decompression_checksum(self): | |
compress_param_num | ||
), | ||
} | ||
compressed_array = zfpy.compress_numpy( | ||
compressed_array_t = zfpy.compress_numpy( | ||
random_array, | ||
write_header=False, | ||
**compression_kwargs | ||
) | ||
|
||
if isinstance(compressed_array_t, np.ndarray): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I understand the intent here. Wouldn't the appropriate test be to ensure that we can pass both a Minor nit: As a C/C++ programmer, I think |
||
compressed_array = compressed_array_t | ||
else: | ||
mem = memoryview(compressed_array_t) | ||
compressed_array = np.array(mem, copy=False) | ||
# Decompression using the "advanced" interface which enforces no header, | ||
# and the user must provide all the metadata | ||
decompressed_array = np.empty_like(random_array) | ||
|
@@ -177,11 +181,16 @@ def test_utils(self): | |
# Decompression using the "public" interface | ||
# requires a header, so re-compress with the header | ||
# included in the stream | ||
compressed_array = zfpy.compress_numpy( | ||
compressed_array_t = zfpy.compress_numpy( | ||
random_array, | ||
write_header=True, | ||
**compression_kwargs | ||
) | ||
if isinstance(compressed_array_t, np.ndarray): | ||
compressed_array = compressed_array_t | ||
else: | ||
mem = memoryview(compressed_array_t) | ||
compressed_array = np.array(mem, copy=False) | ||
decompressed_array = zfpy.decompress_numpy( | ||
compressed_array, | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this second cast from
const void*
tovoid*
necessary, or cancomp_data_pointer
be declared asvoid*
?