Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
class DecompressionStream

An API for decompressing a stream of data.

Examples

Example 1

const input = await Deno.open("./file.txt.gz");
const output = await Deno.create("./file.txt");

await input.readable
  .pipeThrough(new DecompressionStream("gzip"))
  .pipeTo(output.writable);

Constructors

new
DecompressionStream(format: string)

Creates a new DecompressionStream object which decompresses a stream of data.

Throws a TypeError if the format passed to the constructor is not supported.

Properties

readonly
readable: ReadableStream<Uint8Array>
readonly
writable: WritableStream<Uint8Array>