v2 chunk key encoding#

Version:

1.0

Specification URI:

https://zarr-specs.readthedocs.io/en/latest/v3/chunk-key-encodings/v2/

Corresponding ZEP:

ZEP0001 — Zarr specification version 3

Issue tracking:

GitHub issues

Suggest an edit for this spec:

GitHub editor

Copyright 2020-Present Zarr core development team. This work is licensed under a Creative Commons Attribution 3.0 Unported License.


Description#

The configuration object may contain one optional member, separator, which must be either "/" or ".". If not specified, separator defaults to ".".

The identifier for chunk with at least one dimension is formed by concatenating for each dimension:

  • the ASCII decimal string representation of the chunk index within that dimension, followed by

  • the separator character, except that it is omitted for the last dimension.

For example, in a 3 dimensional array, with a separator of . the identifier for the chunk at grid index (1, 23, 45) is the string "1.23.45". With a separator of /, the identifier is the string "1/23/45".

For chunk grids with 0 dimensions, the single chunk has the key "0".

Warning

This encoding is intended only to allow existing v2 arrays to be converted to v3 without having to rename chunks. It is not recommended to be used when writing new arrays.

Status of this document#

ZEP0001 was accepted on May 15th, 2023 via zarr-developers/zarr-specs#227.

Document conventions#

Conformance requirements are expressed with a combination of descriptive assertions and [RFC2119] terminology. The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this document are to be interpreted as described in [RFC2119]. However, for readability, these words do not appear in all uppercase letters in this specification.

All of the text of this specification is normative except sections explicitly marked as non-normative, examples, and notes. Examples in