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

x/deno/ext/web/lib.deno_web.d.ts>CompressionStream

A modern runtime for JavaScript and TypeScript.
Go to Latest
interface CompressionStream
import { type CompressionStream } from "https://deno.land/x/deno@v1.38.1/ext/web/lib.deno_web.d.ts";

An API for compressing a stream of data.

Examples

Example 1

await Deno.stdin.readable
  .pipeThrough(new CompressionStream("gzip"))
  .pipeTo(Deno.stdout.writable);

Properties

readonly
readable: ReadableStream<Uint8Array>
readonly
writable: WritableStream<Uint8Array>
variable CompressionStream
import { CompressionStream } from "https://deno.land/x/deno@v1.38.1/ext/web/lib.deno_web.d.ts";

An API for compressing a stream of data.

Examples

Example 1

await Deno.stdin.readable
  .pipeThrough(new CompressionStream("gzip"))
  .pipeTo(Deno.stdout.writable);

type

{ readonly prototype: CompressionStream; new (format: string): CompressionStream; }