# node-lzma

> node bindings for the lzma compression library

Latest version **0.1.0** (published 2017-07-13) · MIT license · 0 weekly downloads

## Install

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

## 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.1.0 |
| Published | 2017-07-13 |
| First published | 2015-07-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 3 |
| Maintainers | talrasha007 |

## Links

- npm: https://www.npmjs.com/package/node-lzma
- Repository: https://github.com/talrasha007/node-lzma
- Homepage: https://github.com/talrasha007/node-lzma#readme
- Issues: https://github.com/talrasha007/node-lzma/issues
- npm.io page: https://npm.io/package/node-lzma

## Dependencies (2)

- [nan](https://npm.io/package/nan.md) ^2.6.2
- [nnu](https://npm.io/package/nnu.md) ~0.1.7

## Recent versions

- 0.1.0 (latest) — 2017-07-13
- 0.0.1 — 2015-07-24

## README

# node-lzma
  Node.js bindings for the LZMA SDK library.  

# Why i write this package
  - It's native, performance is almost the same as c version.
  - I need ppmd algorithm.
  - Tested on Windows / Linux / OSX

# API
```
/* Stream API is WIP. */

var liblzma = require('node-lzma');

var buf = new Buffer(...);
...blablabal...

// LZMA
var lzma = liblzma.lzma;
var compressedDefault = lzma.compress(buf);
var compressed = lzma.compress(buf, level, threads); // level: 0-9, threads: 1-2, default: { level: 5, threads: 1 }
var decompressed = lzma.decompress(compressed);

// PPMD
var ppmd = liblzma.ppmd;
var compressedDefault = ppmd.compress(buf);
var compressed = ppmd.compress(buf, order, dictSizeMB); // order: 2-64, dictSizeMB: 2 - 2047, default: { order: 8, dictSizeMB: 8 }
var decompressed = ppmd.decompress(compressed);
```

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