Generate chunks from a file.

Warning: modifying the file while FileChunkSource is active may cause undefined behavior.

Implements

Constructors

Methods

Constructors

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.