Type Alias ArrayLikeCodecSize<TPrefix>

ArrayLikeCodecSize: TPrefix | number | "remainder"

Represents all the size options for array-like codecs — i.e. array, map and set.

It can be one of the following:

  • a NumberCodec that prefixes its content with its size.
  • a fixed number of items.
  • or 'remainder' to infer the number of items by dividing the rest of the byte array by the fixed size of its item. Note that this option is only available for fixed-size items.

Type Parameters