Crate zarrs_registry

Crate zarrs_registry 

Source
Expand description

The Zarr extension point registry for the zarrs crate.

Zarr V3 extension points include data types, codecs, chunk grids, chunk key encodings, and storage transformers. Additionally, ZEP0009 introduces a new extension metadata field for arbitrary array and group extensions.

Zarr V2 extension points are limited to data types and codecs.

§Extension Aliasing

An extension point name (or id in Zarr V2) may change over time as the Zarr specification and extensions evolve. For example, the bytes codec was originally called endian in the provisionally accepted Zarr V3 specification. Aliasing of names enables seamless backward compatibility and interoperability between different Zarr versions, Zarr implementations, and extension versions (where compatible).

This crate defines a unique extension identifier for each known extension in each extension point. Known aliases for an extension can be mapped to their unique extension identifier that can be mapped to a default name for metadata serialisation. Extension alias maps can be mutated to support custom extensions or to override the defaults.

Unique extension identifiers are an implementation detail and may not match extension names. However, they are publicly exposed to permit manipulation of aliases and default names.

§Extension Name Conventions

Prior to ZEP0009, a Zarr V3 extension point name was encouraged to be a unique URI pointing to a specification of the extension. ZEP0009 revises conventions for extension point naming:

  • private or experimental extensions must use a namespaced name (e.g. numcodecs.adler32, zarrs.vlen, etc.), and
  • extensions registered at zarr-extensions can use a raw name, such as bfloat16, or a namespaced name.

§Alias Maps

This crate provides Default alias maps for Zarr V2 and V3 extension points. The alias maps define the list of known compatible extension point aliases and a default name for each extension point. The default name is what will be serialised when creating a new array or group, unless overriden. Alias maps are currently limited to codecs and data types, but they may be extended to other extension types in the future.

In the zarrs crate, the extension point aliases can be configured to support custom extensions or to override the defaults, such as if zarrs_metadata is lagging zarr-extensions. This crate will be continually updated to include new compatible extension point aliases as they are developed in other implementations and registered at zarr-extensions.

§Licence

zarrs_registry is licensed under either of

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Modules§

chunk_grid
Unique identifiers for chunk grid extensions.
chunk_key_encoding
Unique identifiers for chunk key encoding extensions.
codec
Unique identifiers for codec extensions.
data_type
Unique identifiers for data type extensions.
storage_transformer
Unique identifiers for storage transformer extensions.

Structs§

ExtensionAliases
Aliases for Zarr extensions.
ExtensionTypeChunkGrid
The chunk grid extension type.
ExtensionTypeChunkKeyEncoding
The chunk key encoding extension type.
ExtensionTypeCodec
The codec extension type.
ExtensionTypeDataType
The data type extension type.
ExtensionTypeStorageTransformer
The storage transformer extension type.
ZarrVersion2
Zarr Version 2.
ZarrVersion3
Zarr Version 3.

Traits§

ExtensionType
Marker trait for extension types.
ZarrVersion
Marker trait for Zarr versions.

Type Aliases§

ExtensionAliasMapRegex
A mapping of extension aliases to extension identifiers (regex match).
ExtensionAliasMapString
A mapping of extension aliases to extension identifiers (string match).
ExtensionAliasesChunkGridV3
Aliases for Zarr V3 chunk grid extensions.
ExtensionAliasesChunkKeyEncodingV3
Aliases for Zarr V3 chunk key encoding extensions.
ExtensionAliasesCodecV2
Aliases for Zarr V2 codec extensions.
ExtensionAliasesCodecV3
Aliases for Zarr V3 codec extensions.
ExtensionAliasesDataTypeV2
Aliases for Zarr V2 data type extensions.
ExtensionAliasesDataTypeV3
Aliases for Zarr V3 data type extensions.
ExtensionAliasesStorageTransformerV3
Aliases for Zarr V3 storage transformer extensions.
ExtensionNameMap
A mapping of extension identifiers to default extension names.