Skip to content

Datamart/lzw-compressor

Repository files navigation

LZW Compressor Tweet

Build Status License NPM version Website NPM downloads

LZW compressor module from Glize library.

Usage

npm install lzw-compressor --save
import { compress, decompress } from 'lzw-compressor';

/**
 * Compress data string using LZW lossless data compression algorithm.
 * @param {string} str Data to compress.
 * @return {string} Returns compressed data.
 */
const encoded = compress(input);

/**
 * Decompress data string compressed with the LZW algorithm.
 * @param {string} str Data to compress.
 * @return {string} Returns compressed data.
 */
const decoded = decompress(encoded);

For more information please visit Glize project page.