zipBuffer.toBuffer([options])
options<string> | <Object> 归档评论,作为{ comment: options }的简写。comment<string> 一个归档评论。默认:zipBuffer.comment。baseOffset<number> 将存档记录的每个偏移量移动这么多字节,所以即使序列化的存档被写在最终文件的起始位置以外,它也是自描述的——例如,在同一输出中已经写入了baseOffset字节的其他内容之后。默认值:0。
- 返回:<Promise> 充满了一个包含序列化档案的<Buffer>。
将当前条目集按添加或读取的顺序序列化到一个新的归档中,并在需要时自动切换到 Zip64 结构(参见 zlib.createZipArchive())。
🌐 Serializes the current set of entries - in the order they were added or
read - into a fresh archive, switching to Zip64 structures automatically as
needed (see zlib.createZipArchive()).