Zipped Zarr¶
virtualizarr.parsers.ZippedZarrParser ¶
Create a ManifestStore from a zipped Zarr store (e.g. a .zarr.zip file).
Creates lightweight virtual references to chunks inside the zip archive without extracting or copying data: the archive's central directory locates every member, and each chunk becomes a byte range within the archive itself. Supports both Zarr V2 and V3 formats, automatically converting V2 metadata to V3.
Only archives whose members are stored without compression (the zip STORED
method — zip -0, and the default for zarr.storage.ZipStore) are currently
supported: compressed members do not preserve chunk byte ranges. Support for
DEFLATE-compressed zipped Zarr, and for wrapping other parsers to read
non-Zarr formats inside zip archives, may be added in the future.
Parameters:
-
group(str | None, default:None) –Path to a specific group within the zipped Zarr store to be used as the Zarr root group for the ManifestStore. Uses forward slashes for nested groups (e.g., "model/output"). Default is None, which uses the store's root group.
-
skip_variables(Iterable[str] | None, default:None) –Variables in the zipped Zarr store that will be ignored when creating the ManifestStore. Default is None, which includes all variables.
__call__ ¶
__call__(url: str, registry: ObjectStoreRegistry) -> ManifestStore
Parse the metadata and byte offsets of a zipped Zarr store to produce a VirtualiZarr ManifestStore.
Parameters:
-
url(str) –The URL of the zip archive (e.g.
"s3://bucket/store.zarr.zip"). -
registry(ObjectStoreRegistry) –An ObjectStoreRegistry for resolving urls and reading data.
Returns:
-
[ManifestStore][ManifestStore]–A virtual representation of the zipped Zarr store with references to byte ranges within the archive.
Raises:
-
ValueError–If the URL cannot be resolved, or the file is not a valid zip archive.
-
NotImplementedError–If any archive member is compressed (only
STOREDmembers are supported).