BaseEncoder
Defined in: astrobase/src/internal/encoding.ts:6
Implements an encoder that converts values to and from base-x strings and Uint8Array
.
Methods
Section titled “Methods”decode()
Section titled “decode()”decode(
encoded
):Uint8Array
Defined in: astrobase/src/internal/encoding.ts:13
Decodes the encoded string to bytes.
Parameters
Section titled “Parameters”encoded
Section titled “encoded”string
The encoded string.
Returns
Section titled “Returns”Uint8Array
The raw bytes.
encode()
Section titled “encode()”encode(
input
):string
Defined in: astrobase/src/internal/encoding.ts:20
Encodes bytes into a string.
Parameters
Section titled “Parameters”Uint8Array
The bytes to encode.
Returns
Section titled “Returns”string
The encoded string.