Files
skills/docs/foundation/bitpacker/bitpacker-strategies/src/strategies/array-notation/array-notation.md
2026-05-29 08:20:56 +01:00

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.