@eazip/core
@eazip/core
The framework-agnostic engine behind Eazip.
@eazip/core is the framework-agnostic engine behind eazip: feed it files,
blobs, or remote URLs and get back a ZIP the browser downloads. It's
ESM-only, tree-shakeable, and needs zero configuration to start zipping
locally in the browser. @eazip/react wraps this package with a
hook and a UI component; everything it does is built on the primitives
documented here.
npm install @eazip/coreIn this section
createZip,startZip&ZipJob— the one-shot promise, the subscribable job, and the object that unifies both strategies.- Inputs & sources — every shape
filesaccepts, and how entry names get resolved and de-duplicated. - Partial results & errors — the
partialstatus, per-file errors, and the full error class taxonomy. - Multi-zip splitting —
maxZipSizeBytes, part naming, and why ZIP64 is always on. - Sessions & resume — picking a cloud job back up after a
reload with
resumeZip.
Prefer a walkthrough first? Getting started and
Quickstart (vanilla) cover the same
ground with a working example. Using React? Skip straight to
@eazip/react.
Entry points
Four entry points, so a bundler only pulls in what you actually use:
| Import from | Contents |
|---|---|
@eazip/core | Everything — local and cloud, dispatched by strategy. |
@eazip/core/local | Browser zipping only — no cloud code in your bundle. |
@eazip/core/cloud | Cloud sessions only — no @zip.js/zip.js in your bundle. |
@eazip/core/shared | Types, errors, and the input/download utilities both engines share. |