Zip entry-name normalization for zipped Zarr stores.
ZipFileStore looks a key up verbatim against the archive's entry names
(its stripPrefix only drops the leading / of the zarr key — it does NOT
strip a directory prefix). So the store's documents must sit at the archive
ROOT: zarr.json, points/c/0, …
Two shapes are produced in the wild and only the first works unaided:
flat — what zarr.storage.ZipStore and luxar optimize's packaging
step write: members keyed store-relative.
nested — what zip -r scene.zip scene.luxar.zarr or
shutil.make_archive produce: every member prefixed scene.luxar.zarr/.
A nested archive would otherwise miss on every single key and surface as an
empty scene with no error at all, which is the worst possible failure for
something a user just hand-rolled. This module detects the single-root case
and re-keys it, and refuses anything ambiguous with a message that says what
the archive actually contains.
Zip entry-name normalization for zipped Zarr stores.
ZipFileStorelooks a key up verbatim against the archive's entry names (itsstripPrefixonly drops the leading/of the zarr key — it does NOT strip a directory prefix). So the store's documents must sit at the archive ROOT:zarr.json,points/c/0, …Two shapes are produced in the wild and only the first works unaided:
zarr.storage.ZipStoreandluxar optimize's packaging step write: members keyed store-relative.zip -r scene.zip scene.luxar.zarrorshutil.make_archiveproduce: every member prefixedscene.luxar.zarr/.A nested archive would otherwise miss on every single key and surface as an empty scene with no error at all, which is the worst possible failure for something a user just hand-rolled. This module detects the single-root case and re-keys it, and refuses anything ambiguous with a message that says what the archive actually contains.