Type aliases
BooleanCodecConfig
BooleanCodecConfig<
TSize
> =object
Defines the configuration options for boolean codecs.
A boolean codec encodes true
as 1
and false
as 0
.
The size
option allows customizing the number codec used for storage.
See
Type Parameters
Type Parameter | Description |
---|---|
TSize extends NumberCodec | NumberDecoder | NumberEncoder | A number codec, encoder, or decoder used for boolean representation. |
Properties
size?
optional
size:TSize
The number codec used to store boolean values.
- By default, booleans are stored as a
u8
(1
fortrue
,0
forfalse
). - A custom number codec can be provided to change the storage size.
Default Value
u8