The ReadableStream instance.
The total size of the data in bytes.
Creates a ReadableStream of the data, optionally restricted to a byte range.
The default implementation reads the data with Reader#readUint8Array. Custom readers can override this method to return a stream provided natively by the underlying data source.
Optionaloptions: CreateReadableOptions
The options.
The ReadableStream instance.
OptionalinitInitializes the instance asynchronously
Reads a chunk of data
The byte index of the data to read.
The length of the data to read in bytes.
A promise resolving to a chunk of data. The data must be trucated to the remaining size if the requested length is larger than the remaining size.
Represents an instance used to read unknown type of data.
Example
Here is an example of custom Reader class used to read binary strings: