# node-zip

> node-zip - Zip/Unzip files ported from JSZip

Latest version **1.1.1** (published 2015-05-03) · 0 weekly downloads

## Install

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

Provides the command `nodezip`.

## 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.1.1 |
| Published | 2015-05-03 |
| First published | 2012-04-29 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 217 |
| Author | Diego Araos |
| Maintainers | daraosn |
| Keywords | zip, unzip, jszip, node-zip, compression |

## Links

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

## Dependencies (1)

- [jszip](https://npm.io/package/jszip.md) 2.5.0

## 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.1.1 (latest) — 2015-05-03
- 1.1.0 — 2014-02-23
- 1.0.1 — 2013-03-10
- 0.0.2 — 2012-09-28
- 0.0.1 — 2012-04-29

## README

node-zip
========

node-zip - Zip/Unzip files ported from JSZip

Installation
------------

	npm install node-zip


Usage
-----

Zip:

	var zip = new require('node-zip')();
	zip.file('test.file', 'hello there');
	var data = zip.generate({base64:false,compression:'DEFLATE'});
	console.log(data); // ugly data


Unzip:

	var zip = new require('node-zip')(data, {base64: false, checkCRC32: true});
	console.log(zip.files['test.file']); // hello there


You can also load directly:

	require('node-zip');
	var zip = new JSZip(data, options)
	...

Write to a file (IMPORTANT: use *binary* encode, thanks to @Acek)

	var fs = require("fs");
	zip.file('test.txt', 'hello there');
	var data = zip.generate({base64:false,compression:'DEFLATE'});
	fs.writeFileSync('test.zip', data, 'binary');

Testing
-------

	npm install -g jasmine-node
	jasmine-node test

Manual
------

node-zip uses JSZip, please refer to their website for further information:
http://stuartk.com/jszip/

Contributors
------------

> David Duponchel [@dduponchel](https://github.com/dduponchel)

Feel free to send your pull requests and contribute to this project

License
-------

MIT

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