Expand description
Reading the Zarr profile’s column store.
docs/zarr-profile.md, “Column store”, is normative. A column store holds
the codes of a run’s published stores cut the other way: one array per
quantity, [time, level, latitude, longitude] (a surface array has no
level axis), whose inner chunk is the whole axis and every level of one
small block of cells. One cell’s column over the run is then one chunk per
quantity. An array is uint8, the map stores’ codes, except a surface
array cut from a series store that widens its variable, which is uint16:
decode_cells_u16 reads either, decode_cells the bytes alone.
Like crate::zarr, this module is IO-free: it takes the group document,
the shard indices and the chunks’ bytes, and returns codes and values. The
group’s consolidated metadata holds every array document and is
authoritative, so the group is the only document read. The metadata rules,
the codec chain, the shard index and the chunk payload are the grid
store’s own; only the block, the dimensions and the cut are this branch’s.
Structs§
- Column
Array - One array of the store, its document held to the block.
- Column
Group - A column store’s group document: the
xue_columnsblock and every array document it consolidates, validated against one another. - Column
Layout - How an array is cut: an inner chunk of the whole axis and every level of one block of cells, a shard of whole blocks across the grid’s width.
- Column
Member - One level of a levelled array, or a surface array’s one field: the bundle its codes come from and that bundle’s variable.
- Column
Reader - A column store being read: the group and the shard indices handed over so far. The caller owns the requests and the chunks’ bytes.
Constants§
- COLUMN_
BLOCK_ CELLS - The cells along each side of a writer’s block. A reader takes the block from the array document and never assumes this one.
- COLUMN_
SHARD_ ROWS - The rows of a writer’s shard, whole blocks; a reader takes it likewise.
- COLUMN_
VERSION - The
xue_columnsblock’s version this reader implements.
Functions§
- chunk_
range - Where the block a cell lies in sits within its shard, or
Nonefor a block the shard never held, which reads as the fill value.indexis that of the cell’s shard (ColumnLayout::shard_of). - decode_
cells - The codes of some cells,
(row, column), of one block of auint8array:cells × frames × levels, cell by cell in the order given, each frame by frame.payloadis the block’s chunk,Nonefor one the shard never held. Auint16array is refused: its codes aredecode_cells_u16’s. - decode_
cells_ u16 decode_cellsof an array of either type: auint8array’s codes widened, auint16one’s (little-endian, the delta modulo 65536) as they are.- decode_
column - One cell’s codes,
frames × levels, frame by frame:decode_cellsof that cell alone. - decode_
column_ u16 decode_columnof an array of either type, the codes widened: what a cell’s series is read with.- parse_
column_ index - Parse one shard’s index, CRC-32C verified, no chunk lying inside an index
at the shard’s start.
bytesis exactly the index.