Skip to main content

Module decode

Module decode 

Source
Expand description

Point decoder (spec §8–§15), allocation-free. Port of go/codec/decode.go and moddef-ts decode.ts (incl. §10.5 selector cases with transform fallback), operating on PointDesc.

Structs§

Ctx
Cross-point context: integer values of scale_ref / selector_ref targets (spec §10.4/§10.5). A slice keeps it heap-free; lookups are O(n) over a handful of refs.

Functions§

decode
Decode a point’s registers into a heap-free Value.
decode_bytes
Decode a BYTES_RAW point into a caller-provided buffer.
decode_raw
Pre-scale integer view (exactness escape hatch, parity with TS decodePointRaw).
decode_str
Decode a string point into a caller-provided buffer (§15).