LZW compressor module from Glize library.
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.