zipFile.compact([comment])


不会修改打开的文件;将结果传输到一个新文件中:

🌐 Does not modify the open file; pipe the result into a new one:

import { createWriteStream } from 'node:fs';
zip.compact().pipe(createWriteStream('compacted.zip'));