web api interface
DecompressionStream
Available in workers
The DecompressionStream interface of the Compression Streams API decompresses a stream of data. It implements the same shape as a TransformStream, allowing it to be used in pipeThrough() and similar methods.
Constructor
DecompressionStream()- : Creates a new
DecompressionStream
- : Creates a new
Instance properties
readable- : Returns the
ReadableStreaminstance controlled by this object.
- : Returns the
writable- : Returns the
WritableStreaminstance controlled by this object.
- : Returns the
Examples
In this example a blob is decompressed using gzip compression.
const ds = new DecompressionStream("gzip");
const decompressedStream = blob.stream().pipeThrough(ds);
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.