[[ZLIBTextCompressor]] Performs the text compression and decompression using zlib

Constructors

Methods

Constructors

Methods

  • Compresses the given text.

    Note: The dictionary used during compression should be the same as that being used during decompression.

    Parameters

    • text: string

      the text that needs to be compressed

    • dictionary: string

      that will be used to seed the compression library to improve compression's performance

    Returns Uint8Array

    a compressed text

  • Decompresses the given text and returns the original text.

    Note: The dictionary used during compression should be the same as that being used during decompression.

    Parameters

    • compressedText: Uint8Array

      that will be decompressed

    • dictionary: string

      that will be used to seed the compression library to improve decompression's performance

    Returns string

    decompressed string