libzarr
Header-only C++17 Zarr v2/v3, WASM-compatible
Loading...
Searching...
No Matches
Public Attributes | List of all members
zarr::ArraySpec Struct Reference

Parameters for Array::create. More...

#include <array.hpp>

Public Attributes

ZarrFormat format = ZarrFormat::v2
 Storage format version to write.
 
std::vector< std::uint64_t > shape
 Array shape; empty = 0-dimensional.
 
std::vector< std::uint64_t > chunks
 Chunk shape, same rank as shape, extents >= 1.
 
DataType dtype
 Element type.
 
std::vector< CodecSpeccodecs
 
std::optional< Bytesfill
 Fill value as one native-order element; defaults to zeros.
 
json attributes = json::object()
 Initial user attributes.
 
char dimension_separator = '.'
 
json dimension_names
 v3 dimension_names (array of strings/null, rank length), or null.
 
std::vector< std::uint64_t > shards
 

Detailed Description

Parameters for Array::create.

Member Data Documentation

◆ codecs

std::vector<CodecSpec> zarr::ArraySpec::codecs

bytes->bytes codecs, via the zarr::codec:: factories (v2: at most one of codec::gzip() / codec::zlib(); v3 additionally codec::blosc() / codec::zstd() / codec::crc32c()).

◆ dimension_separator

char zarr::ArraySpec::dimension_separator = '.'

v2 chunk-key separator; '.' is canonical, '/' supported. (v3 arrays are created with the "default" encoding and '/' regardless.)

◆ shards

std::vector<std::uint64_t> zarr::ArraySpec::shards

v3 sharding: shard (outer chunk) shape; each extent must be a multiple of the corresponding chunks extent. Empty = unsharded. codecs apply to the inner chunks; the index gets bytes + crc32c.


The documentation for this struct was generated from the following file: