804 B
804 B
ArrayConfigPackingStrategy
Packs/unpacks arrays described by an explicit configuration object.
(no submodules)
Schema shape
{
type: "array",
maxLength: number,
elementType: "integer" | "float" | "string" | "boolean" | "schema",
elementMax?: number, // for integer / float / string
elementSchema?: BitPackerSchema // for elementType "schema"
}
Behaviour
- Writes the array length using the minimum bits required for
maxLength. - Each element is packed according to its
elementType. floatelements are encoded as unsigned integers up toelementMax.stringelements are encoded as fixed-length byte sequences (padded with null bytes).schemaelements are recursively packed via the strategy chain.