Skip to main content
Module

x/stream_slicing/partial_reader.ts>PartialReader.fromStream

Deno and Node.js library for working with web standard streams
Latest
method PartialReader.fromStream
import { PartialReader } from "https://deno.land/x/stream_slicing@v1.1.0/partial_reader.ts";

Construct a PartialReader from a ReadableStream.

Internally this will return a subclass of PartialReader based on whether the stream supports byob mode ("bring your own buffer") readers, which are more efficient for some use-cases.

If the stream is seekable, then pass a callback to PartialReaderOptions.seek to enable efficient seeking.

Parameters

stream: ReadableStream<Uint8Array>
optional
options: PartialReaderOptions = [UNSUPPORTED]