gildas-lormeau / zip.js

JavaScript library to zip and unzip files supporting multi-core compression, compression streams, zip64, split files and encryption.
https://gildas-lormeau.github.io/zip.js
BSD 3-Clause "New" or "Revised" License
3.33k stars 506 forks source link

I hope you can set the zip file comment #502

Closed nijinekoyo closed 3 months ago

nijinekoyo commented 3 months ago

I did not find the comment configuration in the ZipWriterConstructorOptions type. Currently I can only set the comment of each file in zipWriter.add(). I hope to set a single zip in new ZipWriter() comment of the file

bwbroersma commented 3 months ago

See ZipWriter close, the optional first argument is the comment for the EOCD: https://github.com/gildas-lormeau/zip.js/blob/7021dd3a036853fabd3dc733a30b7b823e87d5d4/lib/core/zip-writer.js#L201-L203 https://github.com/gildas-lormeau/zip.js/blob/7021dd3a036853fabd3dc733a30b7b823e87d5d4/lib/core/zip-writer.js#L163

nijinekoyo commented 3 months ago

See ZipWriter close, the optional first argument is the comment for the EOCD:

https://github.com/gildas-lormeau/zip.js/blob/7021dd3a036853fabd3dc733a30b7b823e87d5d4/lib/core/zip-writer.js#L201-L203

https://github.com/gildas-lormeau/zip.js/blob/7021dd3a036853fabd3dc733a30b7b823e87d5d4/lib/core/zip-writer.js#L163

That's it, thanks