Skip to content

Does changing the chunks of a zarr Array affect compression ratio? #1627

Answered by rabernat
paulshuker asked this question in Q&A
Discussion options

You must be logged in to vote

In general, yes. Lossless compression fundamentally relies on the presence of repeated values in the data. In the limit of chunks with only one element, there can be no repeated values, and thus no compression. So generally speaking, as you make your chunks larger, you will have more opportunities for compression. The chunk shape can also make a big difference.

To go beyond this very general statement, you would need to do some experiments with your actual dataset to see how compression ratio depends on chunk size and shape.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@paulshuker
Comment options

Answer selected by paulshuker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants