ByteWriter is a convenient way to combine bytes into Uint8Array.

Constructors

  • Creates a new ByteWriter with the optional initial capacity.

    Parameters

    • initialCapacity: number = MIN_CAPACITY

    Returns ByteWriter

Properties

writeInt64BE: ((value: number) => this) = ...
writeInt64LE: ((value: number) => this) = ...
writeUint8: ((byte: number) => this) = ...

Accessors

  • get length(): number
  • Returns the current total length of byte array.

    Returns number

Methods

  • Returns the resulting byte array.

    Returns Uint8Array

  • Parameters

    • value: number

    Returns this

  • Parameters

    • value: number

    Returns this

  • Parameters

    • value: number

    Returns this

  • Parameters

    • value: number

    Returns this

  • Parameters

    • value: number

    Returns this

  • Parameters

    • value: number

    Returns this

  • Parameters

    • value: number

    Returns this

  • Parameters

    • value: number

    Returns this

  • Parameters

    • arrays: Uint8Array[]

    Returns this

  • Parameters

    • value: number

    Returns this

  • Parameters

    • value: number

    Returns this

  • Parameters

    • value: number

    Returns this

  • Parameters

    • value: number

    Returns this

  • Parameters

    • value: number

    Returns this

  • Parameters

    • value: number

    Returns this

  • Parameters

    • bitLength: number
    • value: number

    Returns this

  • Parameters

    • bitLength: number
    • value: number

    Returns this