dir-archiver
v3.0.1
Published
Bytefold-backed archive orchestration for directories/files across Node.js, Deno, and Bun.
Downloads
6,864
Maintainers
Readme
dir-archiver
Archive orchestration for detect/list/audit/extract/normalize/write flows across Node, Deno, and Bun.
What it is
dir-archiver provides one API surface for archive operations with explicit safety profiles and stable error codes.
Install
npm install dir-archiver
deno add jsr:@ismail-elkorchi/dir-archiverQuickstart
import { write, detect, extract } from "dir-archiver";
await write("./project", "./project.zip", {
format: "zip",
includeBaseDirectory: true,
});
const detected = await detect("./project.zip");
await extract("./project.zip", "./out", { profile: "strict" });
console.log(detected.format);Options reference
When not to use
- You only need a low-level parser for a single format.
- You target CommonJS-only environments or Node < 24.
- You need interactive archive browsing UI features.
When to use
- You need one API for detect, list, audit, extract, normalize, and write.
- You want deterministic normalization for CI pipelines.
- You need safety profiles for untrusted inputs.
Compatibility
- Module system: ESM-only.
- Runtimes: Node
>=24, current Deno, current Bun. - CLI and API contracts are documented in
CONTRACT.md.
Links
- Docs index
- Reference:
- How-to:
- Explanation: explanation index
Verification
npm run examples:run
npm run check:fast
npm run check