Options
All
  • Public
  • Public/Protected
  • All
Menu

A byte array builder.

This implementation attempts to minimize append and allocate operations by writing into a pre-allocated array, although additional arrays are allocated as necessary.

Hierarchy

  • Writeable

Index

Constructors

constructor

  • new Writeable(bufferSize?: number): Writeable

Accessors

currentBuffer

  • get currentBuffer(): Uint8Array

totalSize

  • get totalSize(): number

Methods

getBytes

  • getBytes(): Uint8Array

writeByte

  • writeByte(byte: number): void

writeBytes

  • writeBytes(buf: Uint8Array, offset?: number, length?: number): void
  • Parameters

    • buf: Uint8Array
    • Optional offset: number
    • Optional length: number

    Returns void