Functions
getBaseXDecoder
getBaseXDecoder(
alphabet
):VariableSizeDecoder
<string
>
Returns a decoder for base-X encoded strings.
This decoder deserializes base-X encoded strings from a byte array using a custom alphabet. The decoding process converts the byte array into a numeric value in base-10, then maps that value back to characters in the specified base-X alphabet.
For more details, see getBaseXCodec.
Parameters
Parameter | Type | Description |
---|---|---|
alphabet | string | The set of characters defining the base-X encoding. |
Returns
VariableSizeDecoder
<string
>
A VariableSizeDecoder<string>
for decoding base-X strings.
Example
Decoding a base-X string using a custom alphabet.