Class: SalmonFileReadableStream

SalmonFileReadableStream()

Implementation of a javascript ReadableStream for seeking and reading a SalmonFile. This class provides a seekable source with parallel substreams and cached buffers for performance. Make sure you use setWorkerPath() with the correct worker script.

Constructor

new SalmonFileReadableStream()

Source:

Methods

(static) create(salmonFile, buffersCount, bufferSize, threads, backOffset)

Instantiate a seekable stream from an encrypted file source
Parameters:
Name Type Default Description
salmonFile The source file.
buffersCount 0 Number of buffers to use.
bufferSize 0 The length of each buffer.
threads 0 The number of threads/streams to source the file in parallel.
backOffset 0 The back offset. Negative offset for the buffers. Some stream consumers might request data right before the last request. We provide this offset so we don't make multiple requests for filling the buffers ending up with too much overlapping data.
Source: