# node-lzw

> Lempel-Ziv-Welch (LZW) compression algorithm

Latest version **0.3.1** (published 2015-08-07) · GPL license · 0 weekly downloads

## Install

```sh
npm install node-lzw
pnpm add node-lzw
yarn add node-lzw
bun add node-lzw
```

Provides the command `lzw`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2015-08-07 |
| First published | 2014-04-23 |
| Weekly downloads | 0 |
| License | GPL |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Marco Murdocca |
| Maintainers | hormander |
| Keywords | lzw, Lempel, Ziv, Welch, AngularJS, compression |

## Links

- npm: https://www.npmjs.com/package/node-lzw
- Repository: https://github.com/hormander/node-lzw
- Issues: https://github.com/hormander/node-lzw/issues
- npm.io page: https://npm.io/package/node-lzw

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 0.3.1 (latest) — 2015-08-07
- 0.2.25 — 2014-12-22
- 0.2.15 — 2014-11-28
- 0.2.9 — 2014-11-21
- 0.2.8 — 2014-10-29
- 0.2.7 — 2014-10-22
- 0.2.6 — 2014-06-04
- 0.2.5 — 2014-05-16
- 0.2.4 — 2014-05-02
- 0.2.3 — 2014-04-29
- 0.2.2 — 2014-04-28
- 0.2.1 — 2014-04-28
- 0.2.0 — 2014-04-28
- 0.1.6 — 2014-04-28
- 0.1.5 — 2014-04-28
- … 5 more at https://npm.io/package/node-lzw/versions

## README

LZW
-------------

This is LZW compression algorithm 

## Install

```bash
npm install node-lzw
```

## Example

```app.js
"use strict";

var lzw = require("node-lzw");
var buffer = "qwertyuiopasdfghjklzxcvbnm1234567890";

var encode = lzw.encode(buffer);
console.log(encode);

var decode = lzw.decode(buffer);
console.log(decode);

```

## API

### encode(value)

encoding string value and return string encoded

### decode(value)

decoding string value and return string decoded

## AngularJS integration

Under node-lzw-install-path/angular there is lzw.js, port of this library for AngularJS.
Follow example of use.

In your html file put

```html
<script src="path/lzw.js" type="text/javascript"></script>
```

In your angular controller file put

```js
var app = angular.module('app', ['lzw']);

app.controller('myController', function($scope, lzw) {
	...
	var encode = lzw.encode(...);
	...
	var decode = lzw.decode(...);
	...
}
```

## Contributors

- [Marco Murdocca aka `hormander`](https://github.com/hormander)

---
_Source: https://npm.io/package/node-lzw · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
