Skip to content

Cerces


Cerces / middleware/compression / DecompressionStream

Class: DecompressionStream

Defined in: src/middleware/compression.ts:49

Polyfill for DecompressionStream using zlib if runtime does not have built-in support

Implements

  • ReadableWritablePair<Uint8Array, BufferSource>

Constructors

Constructor

new DecompressionStream(format): DecompressionStream

Defined in: src/middleware/compression.ts:52

Parameters

format

CompressionFormat

Returns

DecompressionStream

Properties

readable

readable: ReadableStream<Uint8Array<ArrayBufferLike>>

Defined in: src/middleware/compression.ts:50

Implementation of

ReadableWritablePair.readable


writable

writable: WritableStream<BufferSource>

Defined in: src/middleware/compression.ts:51

Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use.

Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.

Implementation of

ReadableWritablePair.writable