BlobData

An abstraction for BlobData instances.

The wrapper of data (Blob, Buffer, File, string, and so on) that allows to read a specific range of bytes and get data size.

Hierarchy

  • BlobData

Index

Constructors

Constructors

constructor

Methods

Optional Abstract finally

  • finally(): Promise<void>

Abstract readBytes

  • readBytes(offset: number, count: number): Promise<ArrayBufferLike>
  • Gets buffer from a range of data.

    Parameters

    • offset: number

      The first byte of the data range for reading.

    • count: number

      The number of bytes to read from the underlying data. This value will be trimmed if the count exceeded the EOF or end of the stream.

    Returns Promise<ArrayBufferLike>

    The Promise object with the buffer.

Abstract size

  • size(): number