Skip to main content

Module byte_utils

Module byte_utils 

Source
Expand description

Shared byte array conversion utilities.

Used by the compress and archive modules. With the option β Array marshal landing (cluster #3, 2026-05-06 defections.md entry), the FromSlot layer extracts owned Vec<i64> directly from Array<int>-typed slots (HeapKind::TypedArray / TypedArrayData::I64). This module’s job shrinks to the per-element 0..=255 range check that turns a Vec<i64> of arbitrary integers into a Vec<u8>.

bytes_to_array is gone — bodies return TypedReturn::Concrete( ConcreteReturn::Bytes(vec)) directly and the dispatcher projects the variant into a typed array slot.

Functions§

bytes_from_i64_slice
Range-check a Vec<i64> (semantically Array<int> of bytes) into a Vec<u8>.