Multi-ZIP splitting
Understand how maxZipSizeBytes divides large output into predictable ZIP parts.
Set maxZipSizeBytes when one large download would be inconvenient or exceed a
downstream limit:
const result = await createZip({
files,
zipName: 'export.zip',
maxZipSizeBytes: 1_000_000_000,
});
result.downloadAll();result.zips contains one entry for each output part.
A best-effort limit
Eazip estimates compressed size before writing each entry. A ZIP part may exceed the limit when one source file is larger than the configured cap.
How are files assigned to parts?
Eazip preserves input order. Before adding each file, it estimates whether the file fits in the current part. If not, it starts the next part and continues.
A single ZIP entry is never divided across parts. An oversized file therefore gets its own oversized ZIP instead of failing the export.
How are parts named?
- One output keeps the requested name, such as
export.zip. - Multiple outputs use
export_part01.zip,export_part02.zip, and so on. - Part numbers expand beyond two digits when needed.
Does this work with Local and Cloud?
Yes. The same option and result shape apply to both strategies. Local performs the split in the browser; Cloud performs it on the server.
Local archives use ZIP64 so large entry counts and offsets do not hit legacy ZIP limits. Modern operating systems and archive tools support ZIP64.
See Create multi-GB ZIP archives with JavaScript for a complete Cloud workflow.