Skip to content

Add guide for b2nd-to-zarr and zarr-to-b2nd conversion tools - #802

Open
VibhuAg wants to merge 1 commit into
Blosc:mainfrom
VibhuAg:b2nd-to-zarr-guide
Open

VibhuAg wants to merge 1 commit into
Blosc:mainfrom
VibhuAg:b2nd-to-zarr-guide

Conversation

@VibhuAg

@VibhuAg VibhuAg commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

@FrancescAlted FrancescAlted left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! I have some comments,

With `--sharded`, the number of chunks per shard is the number of blocks in each `.b2nd` chunk; set on creation. `sample.b2nd` has chunks of 10 rows and blocks of
2 rows, so each shard holds 10 / 2 = 5 chunks. If the block shape does not
divide the chunk shape evenly (say 3-row blocks in 10-row chunks), the shard
and the chunk have the same shape, and each shard holds a single chunk.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why so? Is that a limitation of Zarr? Or the b2nd-to-zarr tool?

| default (zstd, 5, shuffle) | 7.84x | 2.92 MB |
| `--codec zstd --clevel 9` | 9.95x | 2.30 MB |
| `--codec zlib` | 7.28x | 3.14 MB |
| `--codec lz4` | 3.20x | 7.15 MB |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add blosclz here for completeness.

Conversion Summary
Property Value
Source sample.zarr (2.92 MB)
Destination roundtrip.b2nd (3.25 MB)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original .b2nd file started at 2.88 MB, so perhaps an explanation on why the roundtrip expanded to 3.25 MB would be interesting.

@FrancescAlted

Copy link
Copy Markdown
Member

I have some comments that should be addressed before meging.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GUIDE] Walkthrough for b2nd-to-zarr CLI tool

2 participants