Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Node.js
  3. yazl

yazl

MITJavaScript

A Node.js library for creating ZIP archives with async APIs, memory efficiency, and streaming support.

GitHubGitHub
385 stars51 forks0 contributors

What is yazl?

yazl is a Node.js library for creating ZIP archive files programmatically. It allows developers to add files, buffers, and streams to a ZIP archive with support for async operations and streaming output. The library solves the problem of generating ZIP files efficiently without blocking the event loop or consuming excessive memory.

Target Audience

Node.js developers who need to generate ZIP archives in applications such as file backup systems, data export features, or package distribution tools.

Value Proposition

Developers choose yazl for its non-blocking async APIs, memory-efficient streaming design, and built-in support for large files via ZIP64. It offers fine-grained control over compression and compatibility options.

Overview

yet another zip library for node

Use Cases

Best For

  • Generating ZIP archives from dynamic file sources in Node.js applications
  • Creating large ZIP files without buffering entire contents in memory
  • Streaming ZIP output directly to HTTP responses or file systems
  • Building tools that package multiple files for download or distribution
  • Handling ZIP creation with custom read streams or buffers
  • Ensuring compatibility with specific unzip tools like 7-Zip or Mac Archive Utility

Not Ideal For

  • Applications that need to both create and extract ZIP files within the same library
  • Projects requiring synchronous ZIP creation for simple, blocking scripts
  • Use cases where compatibility with unzip tools that don't support ZIP64, like Mac Archive Utility, is essential
  • Scenarios involving very large in-memory buffers exceeding 0x3fffffff bytes

Pros & Cons

Pros

Async Non-Blocking Design

Uses asynchronous APIs to prevent blocking the JavaScript thread, as emphasized in its design principles for efficient I/O handling in Node.js.

Memory-Efficient Streaming

Avoids buffering entire files in RAM by piping read streams and output streams, keeping memory usage minimal even for large archives, as detailed in the streaming support feature.

Automatic ZIP64 Support

Seamlessly handles files and archives over 4GB by switching to ZIP64 format without manual configuration, ensuring compatibility with large data sets.

Flexible Input Sources

Supports adding files from filesystem, buffers, and custom read streams via methods like addFile, addBuffer, and addReadStreamLazy, offering versatility for different data sources.

Cons

No Extraction Capability

Only creates ZIP files; for unzipping, developers must integrate a separate library like yauzl, adding complexity and dependency management overhead.

Performance Sacrifice for Resource Safety

Opens input files one at a time to avoid OS limits on open file handles, which can slow down archiving compared to parallel approaches, as admitted in the philosophy section.

Buffer Size Constraint

The addBuffer method is limited to buffers of at most 0x3fffffff bytes due to zlib and Node.js constraints, restricting its use for extremely large in-memory data.

Frequently Asked Questions

Quick Stats

Stars385
Forks51
Contributors0
Open Issues14
Last commit5 months ago
CreatedSince 2014

Tags

#async#zip-archives#memory-efficient#nodejs#streaming#backend#file-compression#cli-tools

Built With

N
Node.js

Included in

Node.js65.5k
Auto-fetched 12 hours ago

Related Projects

pakopako

high speed zlib port to javascript, works in browser & node.js

Stars6,114
Forks802
Last commit4 days ago
ArchiverArchiver

a streaming interface for archive generation

Stars2,978
Forks249
Last commit4 days ago
yauzlyauzl

yet another unzip library for node

Stars824
Forks84
Last commit3 months ago
tar-streamtar-stream

tar-stream is a streaming tar parser and generator.

Stars436
Forks105
Last commit13 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub