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 16 apps in this directory
AionUi
AI Agents · Productivity
Free, open-source Cowork desktop app that unifies Claude Code, Codex, Gemini CLI, and 20+ AI agents into a single platform with multi-agent teams, 24/7 cron automation, and zero-config built-in agent.
Docmost
Productivity · Note Taking · Collaboration
Self-hosted collaborative wiki and knowledge base with real-time editing, diagrams, AI assistance, and enterprise access controls — a modern alternative to Confluence and Notion.
Enso
Analytics · Data Engineering · Low Code Platforms
A visual and textual programming platform for data prep and analysis where the node graph and the underlying Enso code are always perfectly in sync, built by an Alteryx co-founder on a GraalVM engine.
FastGPT
AI Agents · AI Development
Build, debug, and deploy knowledge-based AI agents with a visual workflow editor, RAG retrieval, and support for any OpenAI-compatible LLM.
Kibana
Analytics · Monitoring
Your open source window into the Elastic Stack — query, visualize, and act on data stored in Elasticsearch with real-time dashboards, AI-assisted search, and automated alerting.
Kimi Code CLI
AI Code Assistants · AI Agents · Developer Tools
A single-binary, terminal-native coding agent that reads, edits, and runs code end to end, built by Moonshot AI for Kimi models but pluggable with Anthropic, OpenAI, and Google providers too.
LibreChat
Developer Tools · AI Assistants
Unite every major AI model in one self-hosted chat platform with agents, code execution, MCP tools, and enterprise authentication.
LobeHub
AI Assistants · Productivity · Automation
Your Chief Agent Operator — build, schedule, and collaborate with an entire AI team in one self-hostable workspace.
melty
Developer Tools · AI Code Assistants · Code Editors
The AI code editor where every chat message is a git commit you can revert, branch, or squash