Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ZLIBTextCompressor

ZLIBTextCompressor Performs the text compression and decompression using zlib

Hierarchy

  • ZLIBTextCompressor

Index

Constructors

Methods

Constructors

constructor

Methods

compress

  • compress(text: string, dictionary: string): Uint8Array
  • 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

decompress

  • decompress(compressedText: Uint8Array, dictionary: string): string
  • 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

Generated using TypeDoc