getBooleanDecoder
Call Signature
Returns a decoder for boolean values.
This decoder reads a number and interprets 1 as true and 0 as false.
The size option allows customizing the number codec used for storage.
For more details, see getBooleanCodec.
Returns
FixedSizeDecoder<boolean, 1>
A FixedSizeDecoder<boolean, N> where N is the size of the number codec.
Example
Decoding booleans.
See
Call Signature
Returns a decoder for boolean values.
This decoder reads a number and interprets 1 as true and 0 as false.
The size option allows customizing the number codec used for storage.
For more details, see getBooleanCodec.
Type Parameters
| Type Parameter |
|---|
TSize extends number |
Parameters
| Parameter | Type | Description |
|---|---|---|
config | BooleanCodecConfig<NumberDecoder> & object | Configuration options for decoding booleans. |
Returns
FixedSizeDecoder<boolean, TSize>
A FixedSizeDecoder<boolean, N> where N is the size of the number codec.
Example
Decoding booleans.
See
Call Signature
Returns a decoder for boolean values.
This decoder reads a number and interprets 1 as true and 0 as false.
The size option allows customizing the number codec used for storage.
For more details, see getBooleanCodec.
Parameters
| Parameter | Type | Description |
|---|---|---|
config | BooleanCodecConfig<NumberDecoder> | Configuration options for decoding booleans. |
Returns
VariableSizeDecoder<boolean>
A FixedSizeDecoder<boolean, N> where N is the size of the number codec.
Example
Decoding booleans.