DecompressionStream

The DecompressionStream interface of the Compression Streams API is an API for decompressing a stream of data.

Constructor

DecompressionStream.DecompressionStream()

Creates a new DecompressionStream

Properties

DecompressionStream.readable

Returns the ReadableStream instance controlled by this object.

DecompressionStream.writable

Returns the WritableStream instance controlled by this object.

Examples

In this example a blob is decompressed using gzip compression.

const ds = new DecompressionStream('gzip');
const decompressedStream = blob.stream().pipeThrough(ds);

Specifications

Specification
Compression Streams
# decompression-stream

Browser compatibility

BCD tables only load in the browser