Skip to main content

export=

Index

Interfaces

Interfaces

LZStringStatic

LZStringStatic:

LZ-based compression algorithm for JavaScript.

compress

  • compress(uncompressed: string): string
  • Compresses input string producing an instance of an "invalid" UTF-16 string. Such string could be stored in localStorage only on webkit browsers (tested on Android, Chrome, Safari).


    Parameters

    • uncompressed: string

      A string which should be compressed.

    Returns string

compressToBase64

  • compressToBase64(uncompressed: string): string
  • Compresses input string producing an instance of a ASCII UTF-16 string, which represents the original string encoded in Base64. The result can be safely transported outside the browser with a guarantee that none of the characters produced need to be URL-encoded.


    Parameters

    • uncompressed: string

      A string which should be compressed.

    Returns string

compressToEncodedURIComponent

  • compressToEncodedURIComponent(uncompressed: string): string
  • produces ASCII strings representing the original string encoded in Base64 with a few tweaks to make these URI safe. Hence, you can send them to the server without thinking about URL encoding them. This saves bandwidth and CPU


    Parameters

    • uncompressed: string

      A string which should be compressed.

    Returns string

compressToUTF16

  • compressToUTF16(uncompressed: string): string
  • Compresses input string producing an instance of a "valid" UTF-16 string, in the sense that all browsers can store them safely.


    Parameters

    • uncompressed: string

      A string which should be compressed.

    Returns string

compressToUint8Array

  • compressToUint8Array(uncompressed: string): Uint8Array
  • produces an uint8Array


    Parameters

    • uncompressed: string

      A string which should be compressed.

    Returns Uint8Array

decompress

  • decompress(compressed: string): string
  • Decompresses "invalid" input string created by the method compress().


    Parameters

    • compressed: string

      A string obtained from a call to compress().

    Returns string

decompressFromBase64

  • decompressFromBase64(compressed: string): string
  • Decompresses ASCII UTF-16 input string created by the method compressToBase64().


    Parameters

    • compressed: string

      A string obtained from a call to compressToBase64().

    Returns string

decompressFromEncodedURIComponent

  • decompressFromEncodedURIComponent(compressed: string): string
  • Decompresses "valid" input string created by the method compressToEncodedURIComponent().


    Parameters

    • compressed: string

      A string obtained from a call to compressToEncodedURIComponent().

    Returns string

decompressFromUTF16

  • decompressFromUTF16(compressed: string): string
  • Decompresses "valid" input string created by the method compressToUTF16().


    Parameters

    • compressed: string

      A string obtained from a call to compressToUTF16().

    Returns string

decompressFromUint8Array

  • decompressFromUint8Array(compressed: Uint8Array): string
  • Decompresses "valid" array created by the method compressToUint8Array().


    Parameters

    • compressed: Uint8Array

      A string obtained from a call to compressToUint8Array().

    Returns string

Page Options