Generate chunks from a fixed buffer.

Hierarchy

  • KnownSizeChunkSource
    • BufferChunkSource

Implements

Constructors

Properties

chunkSize: number
final: number
finalChunkSize: number
totalSize: number

Methods

  • Generate a chunk on-demand.

    Parameters

    • i: number

      Chunk number, starting from zero.

    Returns Promise<undefined | Chunk>

    Promise that resolves to requested chunk, or undefined if out of range.

  • Parameters

    • i: number
    • offset: number
    • chunkSize: number

    Returns Promise<Uint8Array>