Type aliases
MapCodecConfig
MapCodecConfig<
TPrefix
> =object
Defines the configuration options for map codecs.
The size
option determines how the number of entries in the map is stored.
It can be:
- A NumberCodec to prefix the map with its size.
- A fixed number of entries.
'remainder'
, which infers the number of entries based on the remaining bytes. This option is only available for fixed-size keys and values.
Type Parameters
Type Parameter | Description |
---|---|
TPrefix extends NumberCodec | NumberDecoder | NumberEncoder | A number codec, encoder, or decoder used for the size prefix. |
Properties
size?
optional
size:ArrayLikeCodecSize
<TPrefix
>
The size of the map.