Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PipeArrayBuffer

A class that abstracts a pipe-like ArrayBuffer.

Hierarchy

  • PipeArrayBuffer

Index

Constructors

  • new PipeArrayBuffer(buffer?: ArrayBuffer, length?: number): PipeArrayBuffer

Properties

_buffer: ArrayBuffer

The actual buffer containing the bytes.

_view: Uint8Array

The reading view. It's a sliding window as we read and write, pointing to the buffer.

Accessors

  • get buffer(): ArrayBuffer
  • get byteLength(): number
  • get end(): boolean

Methods

  • alloc(amount: number): void
  • Allocate a fixed amount of memory in the buffer. This does not affect the view.

    Parameters

    • amount: number

      A number of bytes to add to the buffer.

    Returns void

  • read(num: number): ArrayBuffer
  • readUint8(): undefined | number
  • write(buf: ArrayBuffer): void

Generated using TypeDoc