A fresh 4-byte companion holding one fp32 word's wire image: the four
little-endian bytes of its 32-bit word, byte k in bits 8*k.
Generated-layer support, not a codec path: an fp32 field whose value is a
NaN cannot be re-encoded from the number a JS host stored it in — the host
normalizes the payload bits — so the generated message keeps the four raw wire
bytes beside the value and re-emits those (MESSAGE_SPEC §6.5). What the decoder
hands over is the 32-bit word, because a number costs nothing to pass where
the byte view it replaced was an allocation per value and a borrowed slice
§6.7 forbids; turning that word back into bytes is this function, and it is the
same four shifts for every schema (ARCHITECTURE §8).
One function and not two. An into(out, off, bits) flavour beside it would be
the natural companion — it is what the fp32 array path would want — but that
path was retired before this one moved here (§6.7 killed the view), so the
whole family builds this companion per NaN scalar and nothing else calls it.
Public API with no consumer drifts, so there is exactly one entry point and it
allocates: the allocation is per NaN, not per field.
A fresh 4-byte companion holding one fp32 word's wire image: the four little-endian bytes of its 32-bit word, byte
kin bits8*k.Generated-layer support, not a codec path: an
fp32field whose value is aNaNcannot be re-encoded from thenumbera JS host stored it in — the host normalizes the payload bits — so the generated message keeps the four raw wire bytes beside the value and re-emits those (MESSAGE_SPEC §6.5). What the decoder hands over is the 32-bit word, because a number costs nothing to pass where the byte view it replaced was an allocation per value and a borrowed slice §6.7 forbids; turning that word back into bytes is this function, and it is the same four shifts for every schema (ARCHITECTURE §8).One function and not two. An
into(out, off, bits)flavour beside it would be the natural companion — it is what the fp32 array path would want — but that path was retired before this one moved here (§6.7 killed the view), so the whole family builds this companion perNaNscalar and nothing else calls it. Public API with no consumer drifts, so there is exactly one entry point and it allocates: the allocation is perNaN, not per field.