DynamicBuffer

A dynamically-sized view of an Uint8Array. It automatically grows the array size (capacity) and allows you to continuously write to an Uint8Array. The capacity grows by a factor of 2 (1 => 2 => 4 => 8 => 16...).

Constructor

function constructor(capacity: number): this;

Parameters

  • capacity: Initial capacity

Methods

Properties

interface Properties {
	capacity: number;
	length: number;
}
  • capacity
  • length