SetCodecConfig
Defines the configuration options for set codecs.
This configuration allows specifying how the size of the set is encoded.
The size option can be:
- A NumberCodec, NumberEncoder, or NumberDecoder to store the size as a prefix.
- A fixed number of items, enforcing a strict length.
- The string
'remainder'to infer the set size from the remaining bytes (only for fixed-size items).
Type Parameters
| Type Parameter | Description |
|---|---|
TPrefix extends | NumberCodec | NumberDecoder | NumberEncoder | The type used for encoding the size of the set. |
Properties
size?
The size encoding strategy for the set.
Default Value
Uses a u32 prefix.