yauzl
A correctness-focused, streaming unzip library for Node.js
Repository Health
Technical Analysis
yauzl reads ZIP files in Node.js with an emphasis on correctness and low memory use: it parses the central directory rather than scanning entries sequentially, exposes each entry as a Node stream so large files never need to be buffered fully in memory, and refuses to auto-decompress paths that look unsafe (like entries escaping their target directory) unless you explicitly opt in.
It supports ZIP64 for archives and entries beyond the standard 4GB/65535-entry limits, works with password-free ZIPs (both stored and deflated entries), and offers both a callback-based and a promise/async-iterator-friendly API, making it a common low-level dependency underneath higher-level extraction tools and Electron’s asar/archive handling code.
What You Get
- Central-directory-based parsing instead of naive sequential local-file-header scanning
- Per-entry readable streams so large files can be extracted without full in-memory buffering
- Opt-in protection against unsafe entry paths (zip-slip / directory traversal) via a validateEntrySizes-style option
- ZIP64 support for archives and entries exceeding the classic 4GB/65535-entry limits
- Both callback-based and for-await/async-iterator entry iteration APIs
- Support for both stored (uncompressed) and deflated entries
Common Use Cases
- Extracting user-uploaded ZIP archives on a server without loading the whole file into memory
- Building CLI or GUI unzip tools that need entry-by-entry streaming control
- Reading archive formats built on ZIP (like .xpi, .vsix, or Electron .asar-adjacent tooling) programmatically
- Safely unpacking untrusted ZIP files where path-traversal protection matters
Under The Hood
Architecture - index.js locates and parses the End Of Central Directory record (with ZIP64 EOCD locator support) to build an authoritative list of entries, then lazily seeks to each entry’s local header on demand via fd-slicer.js (a companion module for safe, ref-counted file-descriptor slicing) to produce a readable decompression stream per entry, rather than reading the whole archive sequentially. Tech Stack - Pure Node.js (>=12) with a minimal dependency footprint (only pend for pending-callback coordination), relying on Node’s built-in zlib for DEFLATE decompression; no build step, plain CommonJS. Code Quality - The test/ directory includes dedicated fixtures for error conditions, ZIP64 archives, malformed/wrong-entry-sizes inputs, and success/failure archive pairs, reflecting a strong focus on spec-edge-case correctness over feature breadth. API Design - yauzl.open(path, options, callback) returns a ZipFile object whose readEntry()/entry event pair drives sequential streaming reads; this event-driven model requires slightly more boilerplate than a single extractAll() call, but gives callers precise control over memory use and which entries get decompressed.
Used by 17 apps in this directory
NocoBase
Low Code Platforms · No Code Platforms
Open-source AI + no-code platform that lets coding agents and people collaborate to build business systems fast on proven infrastructure.
OpenKnowledge
Code Editors · Knowledge Management · Note Taking
A beautiful, local-first markdown IDE that turns any git repo into a live collaborative workspace for humans and AI coding agents like Claude, Codex, and OpenCode.
Outline
Collaboration · Knowledge Management
A fast, real-time collaborative knowledge base for growing teams built on React, Node.js, and ProseMirror.
overleaf
Collaboration · Productivity
Open-source, real-time collaborative LaTeX editor with sandboxed compilation and full TeXLive support for self-hosted academic and research teams.
PeerTube
Social Media
A federated, ActivityPub-based video hosting platform built by Framasoft — self-hostable instances interconnect into a network with no vendor lock-in, P2P-assisted streaming, and no ads.
rowboat
AI Assistants · AI Development
Build, test, and deploy multi-agent AI workflows with a visual editor, RAG data sources, MCP tool integration, and a production-ready REST API.
SillyTavern
AI Assistants
The power-user LLM frontend that unifies dozens of AI backends with a rich scripting engine, immersive Visual Novel mode, and a thriving extension ecosystem.
Void
AI Code Assistants · Automation · Code Editors
Open-source AI code editor with direct LLM integration and data privacy