# zstd

> ZSTD lossless compression algorithm bindings for Node.js

Latest version **1.0.4** (published 2015-02-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install zstd
pnpm add zstd
yarn add zstd
bun add zstd
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2015-02-09 |
| First published | 2015-02-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 14 |
| Author | x25 |
| Maintainers | x25 |
| Keywords | zstd, compression, decompression |

## Links

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

## Dependencies (1)

- [nan](https://npm.io/package/nan.md) ~1.6

## 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

- 1.0.4 (latest) — 2015-02-09
- 1.0.3 — 2015-02-07
- 1.0.2 — 2015-02-02
- 1.0.1 — 2015-02-02
- 1.0.0 — 2015-02-01

## README

node-zstd [![](https://travis-ci.org/x25/node-zstd.svg?branch=master)](https://travis-ci.org/x25/node-zstd)
=====

ZSTD lossless compression algorithm bindings for Node.js.

## Installation

```bash
$ npm install zstd
```

In case of npm install error:

```
gyp: Call to 'node -e "require('nan')"' returned exit status 127. while trying to load binding.gyp
```

Try to `sudo apt-get install nodejs-legacy` or `sudo ln -s "$(which nodejs)" /usr/bin/node`.

## Usage

```js
var zstd = require('zstd');

var data = new Buffer(1000);
data.fill('A');

var compressed = zstd.compress(data);
var decompressed = zstd.decompress(compressed);

console.log('Compressed:', compressed.length);
console.log('Decompressed:', decompressed.length);

//Compressed: 25
//Decompressed: 1000
```

## Tests

```sh
$ npm test
```

## License
MIT

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