Skip to main content
Version: 2.1.0

CompressionStream()

The CompressionStream() constructor creates a new CompressionStream object which compresses a stream of data.

Syntax

new CompressionStream(format)

Parameters

  • format

    • : One of the following allowed compression formats:

      • "gzip"
      • "deflate"
      • "deflate-raw"

Exceptions

  • TypeError
    • : Thrown if the format passed to the constructor is not supported.