A robust, spec-compliant Node.js library for reading ZIP archives with async APIs and memory safety.
yauzl is a Node.js library for reading and extracting files from ZIP archives. It solves the problem of safely and efficiently parsing ZIP files by adhering strictly to the specification, using asynchronous APIs to avoid blocking, and controlling memory usage. It focuses on correctness, error resilience, and security against malformed archives.
Node.js developers who need to programmatically read ZIP files in applications such as file upload processors, backup tools, or package managers. It's particularly useful for those handling archives with many entries or requiring robust error handling.
Developers choose yauzl for its strict spec compliance, which ensures reliable metadata reading, and its memory-efficient lazy entry processing. Its design prevents crashes on malformed files and includes built-in security validation, making it a robust alternative to other ZIP libraries.
yet another unzip library for node
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Reads metadata from the central directory instead of unreliable local headers, ensuring accurate file information even with malformed archives, as emphasized in the README's design principles.
Offers lazy entry reading via the lazyEntries option to prevent buffering entire files in RAM, making it suitable for archives with thousands of entries without high memory usage.
Includes validateFileName() to catch unsafe file paths and prevent directory traversal attacks, automatically run when decodeStrings is true for enhanced security.
Handles archives up to 8 PiB through ZIP64 extended information extra fields, crucial for modern large-scale data processing as noted in the key features.
Uses and provides async APIs throughout, avoiding blocking the JavaScript event loop, which aligns with Node.js best practices for I/O operations.
Cannot parse ZIP files from a readable stream due to spec compliance requiring the central directory at the end, limiting use in web or network scenarios where files are streamed.
Only identifies encrypted entries via isEncrypted() but provides no decryption functionality, forcing developers to integrate external libraries for secure extraction of protected files.
Requires attaching error listeners to ZipFile objects and read streams, along with callback checks, to avoid crashes on malformed files, which can be error-prone if overlooked.
Features like dosDateTimeToDate() are deprecated and will be removed in version 4.0, necessitating code updates for long-term maintenance and potentially causing migration headaches.