Skip to main content

Module decode

Module decode 

Source
Expand description

Reading a Xue bundle, in four layers over crate::format:

  • metadata turns the metadata JSON into the grid, the time axis and the variable set the rest of the decoder trusts. It is shared by both container versions, which differ only below the index.
  • structure validates the header geometry and the index — the layer that decides a file is well-formed. It parses a v1 plane index (with its dependency chains) or a v2 tiled one into the layout core dispatches on.
  • core replays residuals over payload bytes, wherever they came from, and assembles planes and cell series out of tiles. Its chunk path is also exposed on its own as decode_chunk (decode_chunk_u16 for 16-bit codes), for a chunk that did not come out of a container index — an inner chunk of the Zarr store.
  • bundle is the public surface: Bundle and StreamingBundle.

Structs§

Bundle
StreamingBundle
A bundle opened from just its structural prefix, with payload bytes arriving incrementally as HTTP range responses.

Functions§

decode_chunk
Decode one chunk payload outside any container.
decode_chunk_u16
decode_chunk for a chunk of 16-bit codes: the Zstandard frame holds frames × height × width little-endian u16s in the same order, and the PREVIOUS chain is a modulo-65536 residual along the frame axis. The size limit counts codes, so the frame may decompress to twice MAX_PLANE_LENGTH bytes.