Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Base16

Base-16 (hexadecimal) encoding Parser/Writer factory.

Hierarchy

  • Base16

Index

Constructors

constructor

  • new Base16(alphabet: string): Base16

Methods

alphabet

  • alphabet(): string

encodeDigit

  • encodeDigit(b: number): number

uint8ArrayWriter

  • uint8ArrayWriter(): Writer<Uint8Array, unknown>
  • uint8ArrayWriter(input: Uint8Array): Writer<unknown, Uint8Array>

writeInteger

  • writeInteger(input: number, output: Output, width?: number): Writer<unknown, unknown>

writeIntegerLiteral

  • writeIntegerLiteral(input: number, output: Output, width?: number): Writer<unknown, unknown>

writeUint8Array

  • writeUint8Array(input: Uint8Array, output: Output): Writer<unknown, unknown>
  • Writes the base-16 (hexadecimal) encoding of the input Uint8Array to the output, returning a Writer continuation that knows how to write any remaining output that couldn't be immediately generated.

    Parameters

    • input: Uint8Array
    • output: Output

    Returns Writer<unknown, unknown>

Static decodeDigit

  • decodeDigit(c: number): number

Static isDigit

  • isDigit(c: number): boolean

Static lowercase

Static parse

  • Parses the base-16 (hexadecimal) encoded input, and writes the decoded bytes to output, returning a Parser continuation that knows how to parse any additional input.

    Type parameters

    • O

    Parameters

    Returns Parser<O>

Static parseUint8Array

  • Parses the base-16 (hexadecimal) encoded input, and writes the decoded bytes to a growable array, returning a Parser continuation that knows how to parse any additional input. The returned Parser binds a Uint8Array array containing all parsed base-16 data.

    Parameters

    Returns Parser<Uint8Array>

Static parser

Static uppercase

Static writeQuantum

  • writeQuantum(c1: number, c2: number, output: Output): void