Type aliases
ArrayCodecConfig
ArrayCodecConfig<
TPrefix
> =object
Defines the configuration options for array codecs.
Type Parameters
Type Parameter | Description |
---|---|
TPrefix extends NumberCodec | NumberDecoder | NumberEncoder | A number codec, decoder, or encoder used for size prefixing. |
Properties
size?
optional
size:ArrayLikeCodecSize
<TPrefix
>
Specifies how the size of the array is determined.
- A NumberCodec, NumberDecoder, or NumberEncoder stores a size prefix before encoding the array.
- A
number
enforces a fixed number of elements. "remainder"
uses all remaining bytes to infer the array length (only for fixed-size items).
Default Value
A u32
size prefix.