Functions
getBase10Codec
getBase10Codec():
VariableSizeCodec
<string
>
Returns a codec for encoding and decoding base-10 strings.
This codec serializes strings using a base-10 encoding scheme. The output consists of bytes representing the numerical values of the input string.
Returns
VariableSizeCodec
<string
>
A VariableSizeCodec<string>
for encoding and decoding base-10 strings.
Example
Encoding and decoding a base-10 string.
Remarks
This codec does not enforce a size boundary. It will encode and decode all bytes necessary to represent the string.
If you need a fixed-size base-10 codec, consider using fixCodecSize.
If you need a size-prefixed base-10 codec, consider using addCodecSizePrefix.
Separate getBase10Encoder and getBase10Decoder functions are available.