# gzip-stream

> To create a valid gzip from many individual streams first use createDeflatePart() which returns a through stream to convert your parts to the deflated part. when this through stream emits the 'end' event you should call its `metadata()` function which wil

Latest version **2.1.0** (published 2026-06-18) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install gzip-stream
pnpm add gzip-stream
yarn add gzip-stream
bun add gzip-stream
```

## Health

**Score 60/100 (C)** — status: active.

Positive: no vulnerabilities; has provenance; recently updated; high maintenance score.

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

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2026-06-18 |
| First published | 2015-10-25 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=16 |
| Dependencies | 3 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 3 |
| Author | Balena Ltd. |
| Maintainers | balena.io |

## Links

- npm: https://www.npmjs.com/package/gzip-stream
- Repository: https://github.com/balena-io-modules/gzip-stream
- Issues: https://github.com/balena-io-modules/gzip-stream/issues
- npm.io page: https://npm.io/package/gzip-stream

## Dependencies (3)

- [crc32-stream](https://npm.io/package/crc32-stream.md) ^4.0.0
- [combined-stream](https://npm.io/package/combined-stream.md) ^1.0.8
- [@balena/node-crc-utils](https://npm.io/package/@balena/node-crc-utils.md) ^3.1.0

## Recent versions

- 2.1.0 (latest) — 2026-06-18
- 2.1.0-build-getGzipSizeFromParts-c6ded05785cb8c02c7eda1e429946270dc619782-1 (build-getGzipSizeFromParts) — 2026-06-17
- 2.0.3-build-update-crc-utils-7afa168fe3e497f0d2dae3f4f691faa6ea34c7bf-1 (build-update-crc-utils) — 2026-06-03
- 2.0.2-build-large-file-support-9828ba3f6708000e1c8f0bf108d00fe2ba754dbf-1 (build-large-file-support) — 2026-05-28
- 2.0.1-build-add-npm-oidc-permissions-57efafa12587a346d77df74b99131c7f1df087d5-1 (build-add-npm-oidc-permissions) — 2026-02-18
- 2.0.0-build-support-node-18-3a5a9d6209d72760554344f96507b3d2b06c953d-1 (build-support-node-18) — 2023-01-20
- 0.0.2-fix-deflate-end-stripping-d32594cfff7af135c7b67387bac14630d711ccb4 (fix-deflate-end-stripping-d32594cfff7af135c7b67387bac14630d711ccb4) — 2019-10-03
- 0.0.2-fix-deflate-end-stripping-6752aa5820df49e36b1d488b3b86d55fbf5781a7 (fix-deflate-end-stripping-6752aa5820df49e36b1d488b3b86d55fbf5781a7) — 2019-10-03
- 0.0.2-fix-deflate-end-stripping-c53747458e2e187131d3e307cee3d2ca70d28c76 (fix-deflate-end-stripping-c53747458e2e187131d3e307cee3d2ca70d28c76) — 2019-10-03
- 2.0.3 — 2026-06-03
- 2.0.2 — 2026-05-31
- 2.0.2-build-large-file-support-f187e1a94e5c63f472b1fd52ca3a8ad858a3e8a5-1 — 2026-05-28
- 2.0.2-build-large-file-support-a32d1f119b9779e041d981ae051b6e0f85eb0dba-1 — 2026-05-27
- 2.0.2-build-large-file-support-3b05fe923bd50846612f0954a840b06d7b07234a-1 — 2026-05-25
- 2.0.1 — 2026-02-18
- … 18 more at https://npm.io/package/gzip-stream/versions

## README

# gzip-stream

To create a valid gzip from many individual streams first use createDeflatePart() which returns a through stream to convert your parts to the deflated part. when this through stream emits the 'end' event you should call its `metadata()` function which will give you back an object in the form of `{ len, zLen, digest }`

To create the final stream pass an array of objects in the form of `{ stream: your_readable_stream, len, zLen, digest }` to `createGzipStream()` and you'll get back a readable stream that also has a `zLen` property containing the total bytes of the compressed stream.

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