deno / 1.23.2 / ~ / compressionstream.html /

CompressionStream

An API for compressing a stream of data.

@example
await Deno.stdin.readable
  .pipeThrough(new CompressionStream("gzip"))
  .pipeTo(Deno.stdout.writable);
class CompressionStream {
constructor( format: string);
readonly readable : ReadableStream<Uint8Array>;
readonly writable : WritableStream<Uint8Array>;
}

Constructors

new CompressionStream( format: string)

Creates a new CompressionStream object which compresses a stream of data.

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

Properties

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