TextDecoderStream
Encoding API
Encoding API
The TextDecoderStream interface of the converts a stream of text in a binary encoding, such as UTF-8 etc., to a stream of strings.
It is the streaming equivalent of TextDecoder.
It implements the same shape as a TransformStream, allowing it to be used in ReadableStream.pipeThrough() and similar methods.
Constructor
- TextDecoderStream()
- : Creates a new
TextDecoderStreamobject.
Instance properties
- TextDecoderStream.encoding
- : An encoding.
- TextDecoderStream.fatal
- : A Boolean indicating if the error mode is fatal.
- TextDecoderStream.ignoreBOM
- : A Boolean indicating whether the byte order mark is ignored.
- TextDecoderStream.readable
- : Returns the ReadableStream instance controlled by this object.
- TextDecoderStream.writable
- : Returns the WritableStream instance controlled by this object.
Examples
Examples of streaming structured data and HTML
Specifications
Browser compatibility
See also
- TextEncoderStream
- TextDecoder
- TransformStream
- Streams API Concepts
- Experimenting with the Streams API
- Streaming requests with the fetch API, developer.chrome.com (2020)