# deterministic-zip

> A ZIP library that generates the same zip file from the same files every time

Latest version **1.1.0** (published 2019-07-20) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2019-07-20 |
| First published | 2016-11-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 8.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 29 |
| Author | Erwin van der Koogh |
| Maintainers | evanderkoogh |

## Links

- npm: https://www.npmjs.com/package/deterministic-zip
- Repository: https://github.com/bitgenics/deterministic-zip
- Homepage: https://github.com/bitgenics/deterministic-zip#readme
- Issues: https://github.com/bitgenics/deterministic-zip/issues
- npm.io page: https://npm.io/package/deterministic-zip

## Dependencies (3)

- [async](https://npm.io/package/async.md) ^3.1.0
- [minimatch](https://npm.io/package/minimatch.md) ^3.0.3
- [crc32-stream](https://npm.io/package/crc32-stream.md) ^3.0.0

## Recent versions

- 1.1.0 (latest) — 2019-07-20
- 1.0.5 — 2017-02-28
- 1.0.4 — 2017-01-25
- 1.0.3 — 2016-12-03
- 1.0.2 — 2016-12-03
- 1.0.1 — 2016-12-03
- 1.0.0 — 2016-11-23

## README

# deterministic-zip

Regular zip binaries and libraries often generate different zip files from the same files most often because of metadata or timestamps. Deterministic-zip guarantees to always generate the same zip file every time.

This is a major problem when creating a reproducible build. The output from two builds from identical source would generate two different zip files.

With deterministic-zip you are guaranteed to get the exact same file every time you build from the same input.

# Usage

## Install

`npm install deterministic-zip --save`

## Zip

```javascript
const zip = require('deterministic-zip');

zip('data', 'test.zip', {includes: ['./index.js', './src/**'], cwd: 'data'}, (err) => {
    console.log('Done!');
});
```

## Warning

This is a very new library. I use it myself, but it has not been extensively test across multiple platforms, especially Windows.

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