549 B
549 B
ArrayNotationPackingStrategy
Packs/unpacks arrays described by a string notation.
(no submodules)
Schema shape
String tokens of the form -length[elementSchema], e.g.:
-5[10]→ array of up to 5 integers (max 10)-5[true]→ array of up to 5 booleans-3[{"x":255}]→ array of up to 3 objects
Behaviour
Parses the notation into an ArrayConfig and packs:
- Length prefix using the minimum bits for
length. - Elements encoded according to the inner schema.