Available on crate feature
encoder only.Expand description
Xue temporal grouping, tiling and residual coding — the port of
xuebuild/temporal.py.
Residuals are one-byte modulo-256 wrapping differences. Wrapping subtraction and addition are lossless for every byte pair, so there is no residual range check, no signed interpretation, and no RAW fallback.
Grouping is shared by both container versions: a group is a run of consecutive frames formed inside a segment of constant step. What differs is what a group is physically — v1 stores one plane per frame with a middle anchor, v2 packs the group into each tile’s chunk with the residuals chained against the previous frame.
Constants§
Functions§
- build_
chunks - The v2 index tables and uncompressed chunks of one bundle.
- encode_
chunk - The stored bytes of one chunk, in place.
- encode_
residual - group_
forecast_ hours - Temporal groups, formed inside segments of constant step so no group straddles a change of cadence (an ANCHOR residual is then always a difference between frames one step apart).
- split_
segments - Maximal runs of constant step (docs/format.md “segment”): a boundary falls between two frames exactly where the step changes, so a uniform axis is one segment and the GFS 240-hour axis is two.
- tile_
stack - One tile’s block of a group’s planes, frame-major and clipped.