← Back to index
variable 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);

type

🔗
{ readonly prototype: DecompressionStream; new (format: string): DecompressionStream; }
interface 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);

Properties

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