ArrayLikeCodecSize
Defines the possible size strategies for array-like codecs (array, map, and set).
The size of the collection can be determined using one of the following approaches:
- A NumberCodec, NumberDecoder, or NumberEncoder to store a size prefix.
- A fixed
numberof items, enforcing an exact length. - The string
"remainder", which infers the number of items by consuming the rest of the available bytes. This option is only available when encoding fixed-size items.
Type Parameters
| Type Parameter | Description |
|---|---|
TPrefix extends | NumberCodec | NumberDecoder | NumberEncoder | A number codec, decoder, or encoder used for size prefixing. |