@thi.ng/base-n
Version:
Arbitrary base-n conversions w/ presets for base8/16/32/36/58/62/64/83/85, support for bigints and encoding/decoding of byte arrays
12 lines • 427 B
TypeScript
import type { IBaseDecode } from "./api.js";
export declare class BaseNDecoder implements IBaseDecode {
readonly base: string;
readonly N: number;
readonly index: Record<string, number>;
constructor(base: string);
decode(x: string): number;
decodeBigInt(x: string): bigint;
decodeBytes(x: string, buf: Uint8Array): Uint8Array;
validate(x: string): boolean;
}
//# sourceMappingURL=decode.d.ts.map