Skip to main content

Module encode

Module encode 

Source
Expand description

Point encoder (spec §10 inverse, §11.4/§11.5), allocation-free. Port of go/codec/encode.go / moddef-ts encode.ts: composed values and packed field windows stay read-oriented.

Functions§

encode
Encode a value into out registers (must be exactly p.words() long).
encode_bytes
Encode raw bytes (BYTES_RAW).
encode_str
Encode a string point (fixed window, §15); pads with zero bytes.
validate_write
§11.4 write constraint validation in engineering units.