https://github.com/datamart/lzw-compressor
🗜️ LZW compressor module from Glize library.
https://github.com/datamart/lzw-compressor
glize-library javascript lzw-compressor
Last synced: over 1 year ago
JSON representation
🗜️ LZW compressor module from Glize library.
- Host: GitHub
- URL: https://github.com/datamart/lzw-compressor
- Owner: Datamart
- License: apache-2.0
- Created: 2021-06-21T03:19:04.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-11-21T00:51:53.000Z (over 4 years ago)
- Last Synced: 2025-03-13T03:36:37.043Z (over 1 year ago)
- Topics: glize-library, javascript, lzw-compressor
- Language: JavaScript
- Homepage: https://glize.js.org
- Size: 16.6 KB
- Stars: 6
- Watchers: 3
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# LZW Compressor [](https://twitter.com/intent/tweet?text=LZW%20compressor%20module%20from%20Glize%20library.&url=https://glize.js.org&via=GitHub&hashtags=Glize,JavaScript,ECMAScript,ES6)
[](https://github.com/Datamart/lzw-compressor/actions/workflows/npm-publish.yml) [](https://www.apache.org/licenses/LICENSE-2.0.html) [](https://npmjs.org/package/lzw-compressor) [](https://glize.js.org) [](https://npmjs.org/package/lzw-compressor)
LZW compressor module from Glize library.
## Usage
```bash
npm install lzw-compressor --save
```
```js
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](https://glize.js.org).