-
Notifications
You must be signed in to change notification settings - Fork 0
Add "no compressor" as a compressor #58
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
Comments
I've added reading/writing a zarr array with no compressor on my current branch, but I'm seeing some odd values for the compression ratio. For example, running the script below with zarr python v3, gives a compression ratio less than 1! (0.5 compression ratio) The same happens for zarr python v2. I think the issue here is that our dev image has a shape of
|
I guess it depends on how we're defining compression ratio - if it's the (size of the array if image stored at current size with no compression / size of array as zarr array), then I guess it is possible to have a compression ratio less than 1. In this case, the uncompressed zarr array is really taking up more space than a |
It's certainly a known issue for zarr-python 2: zarr-developers/zarr-python#2174. If it's an issue for zarr-python 3 I'm not sure if that's a known issue, so a reproducible example and issue in zarr-python would be very welcome! I thought to get around this we were directly measuring the size of the array as the size of the folder that it's written to, instead of relying on |
We're only using that for Even so, Tensorstore is still reporting a compression ratio below 1 (0.5, same as zarr-python). It seems that |
Something like |
Ah right, I think that makes sense. Because every chunk has to be full, you always store the first multiple of the chunk size above your actual data size. So for 100 x 100 x 100 it makes sense that not compressing ends up with more bytes on disk, so the compression ratio is < 1. Since OME-Zarr is used for big data, this effect is less relevant (an extra 100 array elements on the end of say ~2000 array items is a much smaller fraction). So I would say we just update the dev image to be 128 x 128 x 128 exactly, so it doesn't end up with a potentially confusing < 1 compression ratio. Thoughts? |
Sounds reasonable to me! I'll update the size to |
No description provided.
The text was updated successfully, but these errors were encountered: