getHiddenPrefixDecoder
Call Signature
getHiddenPrefixDecoder<
TTo
>(decoder
,prefixedDecoders
):FixedSizeDecoder
<TTo
>
Returns a decoder that skips hidden prefixed data before decoding the main value.
This decoder applies a list of void decoders before decoding the main value. The prefixed data is skipped during decoding without being exposed to the user.
For more details, see getHiddenPrefixCodec.
Type Parameters
Type Parameter | Description |
---|---|
TTo | The type of the main value being decoded. |
Parameters
Parameter | Type | Description |
---|---|---|
decoder | FixedSizeDecoder <TTo > | The decoder for the main value. |
prefixedDecoders | readonly FixedSizeDecoder <void >[] | A list of void decoders that produce the hidden prefix. |
Returns
FixedSizeDecoder
<TTo
>
A FixedSizeDecoder
or VariableSizeDecoder
that decodes values while ignoring the hidden prefix.
Example
Decoding a value with prefixed constants.
See
Call Signature
getHiddenPrefixDecoder<
TTo
>(decoder
,prefixedDecoders
):VariableSizeDecoder
<TTo
>
Returns a decoder that skips hidden prefixed data before decoding the main value.
This decoder applies a list of void decoders before decoding the main value. The prefixed data is skipped during decoding without being exposed to the user.
For more details, see getHiddenPrefixCodec.
Type Parameters
Type Parameter | Description |
---|---|
TTo | The type of the main value being decoded. |
Parameters
Parameter | Type | Description |
---|---|---|
decoder | Decoder <TTo > | The decoder for the main value. |
prefixedDecoders | readonly Decoder <void >[] | A list of void decoders that produce the hidden prefix. |
Returns
VariableSizeDecoder
<TTo
>
A FixedSizeDecoder
or VariableSizeDecoder
that decodes values while ignoring the hidden prefix.
Example
Decoding a value with prefixed constants.