Archiver

A streaming Node.js library for generating ZIP and TAR archives on the fly

Library
npm
v8.0.0
2,977 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
59 /100 Fair
Development Activity 48
Maintenance 32
Community 56
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
83 /100 Excellent
Architecture 86
Code Quality 82
Innovation 80
Learning Curve 85

Archiver is a battle-tested Node.js library that provides a unified, streaming interface for generating archive files. It ships with out-of-the-box support for the ZIP and TAR formats and lets you append data from files, strings, buffers, readable streams, glob patterns, and entire directories, all while piping the compressed output directly to any writable destination.

Built on top of Node’s native stream primitives, Archiver keeps memory usage low even for very large archives by processing entries through an internal work queue rather than buffering everything up front. With over 31 million weekly downloads it is one of the most widely relied-upon packaging libraries in the JavaScript ecosystem.

What You Get

  • A single streaming API that produces both ZIP and TAR (including gzip-compressed .tar.gz) archives
  • Flexible entry sources: files, strings, buffers, readable streams, glob patterns, and recursive directories
  • Fine-grained per-entry control over names, dates, permissions, path prefixes, and symlink handling
  • Progress and lifecycle events (entry, progress, warning, error) plus a byte pointer for tracking output size
  • Low, predictable memory usage via an internal concurrency-limited work queue

Common Use Cases

  • Generating downloadable ZIP bundles on the fly in an Express or other HTTP server response
  • Packaging build artifacts, logs, or backups into TAR/TAR.GZ files from a Node script
  • Bundling user-uploaded files or exported data into a single archive for download
  • Creating deployment or release archives as part of a CI/CD pipeline

Under The Hood

Architecture — Archiver centers on lib/core.js, an 851-line Archiver class extending readable-stream’s Transform. Format-specific classes in index.js (ZipArchive, TarArchive, JsonArchive) subclass the core and wire in a pluggable format engine from lib/plugins/ (zip.js delegates to zip-stream, tar.js to tar-stream). Appended entries flow through two async work queues — a stat queue (default concurrency 4) that resolves filesystem metadata and a serial processing queue that feeds each normalized entry into the format module, whose output is piped back through the Transform, keeping memory flat and honoring highWaterMark backpressure. finalize() drains the queues and closes the underlying module.

Tech Stack — Pure JavaScript ES modules targeting Node >=18. Runtime dependencies are small, focused packages: zip-stream and tar-stream for format encoding, readable-stream for stream primitives, async for the work queues, readdir-glob/normalize-path/lazystream for directory and glob traversal, buffer-crc32 and is-stream as helpers. Tests use Mocha with Chai; docs are generated via JSDoc.

Code Quality — Well-structured with clear separation between the streaming core, the error module, utilities, and per-format plugins. Errors are centralized in lib/error.js as a coded ArchiverError with a fixed table of validation messages, and input validation is explicit throughout the append path. A substantial test suite (~710 lines across test/archiver.js and test/plugins.js) exercises the core and each format, and the public API is thoroughly documented with JSDoc annotations.

API Design — The API is highly ergonomic: instantiate a format class, attach error/warning handlers, pipe() to an output, then append(), file(), directory(), or glob() and call finalize(). Method names read naturally, options are consistent across formats, and switching output format is a one-line change. The README quick-start plus a directory of runnable examples make the getting-started path short with minimal boilerplate.

Used by 40 apps in this directory

Python
85%
MIT

ai-toolkit

AI Design Tools · AI Development

12,143

An all-in-one open-source training suite for finetuning diffusion models—FLUX, SDXL, Wan video, and audio—on consumer GPU hardware via CLI or web UI.

View details
79
Repo Health
66
Technical
72
Dependency
Built with
Python 85%
TypeScript 14%
Updated 5 days ago
Go
92%
AGPL 3.0

BillionMail

Marketing

15,695

Self-hosted email server and marketing platform that gives you unlimited sending, full deliverability control, and AI-assisted campaigns without monthly fees.

View details
52
Repo Health
74
Technical
70
Dependency
Built with
Go 92%
Updated 3 months ago
TypeScript
92%
GPL 3.0

Blinko

Knowledge Management · Note Taking

11,049

A self-hosted, AI-powered card note-taking tool that lets you capture fleeting thoughts instantly and retrieve them with natural language search.

View details
75
Repo Health
69
Technical
63
Dependency
Built with
TypeScript 92%
Updated 1 months ago
TypeScript
70%
Other

Budibase

Low Code Platforms · No Code Platforms

28,324

Build AI agents, automations, and internal apps on a single open-source platform with full self-hosting control.

View details
91
Repo Health
81
Technical
63
Dependency
Built with
TypeScript 70%
Svelte 26%
Updated 1 weeks ago
TypeScript
99%
AGPL 3.0

Cherry Studio

AI Assistants

52,202

All-in-one AI desktop client with 300+ assistants and multi-model support

View details
89
Repo Health
84
Technical
70
Dependency
Built with
TypeScript 99%
Updated 4 days ago
TypeScript
98%
Apache 2.0

Cline

AI Code Assistants

69,455

An open-source AI coding agent that lives in your editor and terminal — reads and edits your codebase, runs commands, browses the web, and requires human approval for every action by default.

View details
90
Repo Health
74
Technical
65
Dependency
Built with
TypeScript 98%
Updated 4 days ago
Go
75%
AGPL 3.0

Coder

Code Editors · Developer Tools · Devops

16,729

Self-hosted cloud development environments and AI coding agents — defined in Terraform, connected via WireGuard, automatically shut down when idle.

View details
91
Repo Health
90
Technical
65
Dependency
Built with
Go 75%
TypeScript 23%
Updated 4 days ago
JavaScript
90%
Other

CodeSandbox

Code Editors · Developer Tools

13,650

Instantly ready browser-based IDE that runs full npm dependency resolution and transpilation entirely client-side, with no server needed.

View details
67
Repo Health
76
Technical
62
Dependency
Built with
JavaScript 90%
Updated 3 weeks ago
TypeScript
45%
Other

Convex Backend

Databases · Developer Tools

12,617

Open-source reactive database that lets developers build live-updating apps with pure TypeScript, strong consistency, and real-time subscriptions—no separate API layer required.

View details
87
Repo Health
82
Technical
68
Dependency
Built with
TypeScript 45%
Rust 43%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers