node-zip-stream
node-zip-stream copied to clipboard
blank files should be stored
If the empty file is not stored, using ZipInputStream to decompress will throw the following error:
java.util.zip.ZipException: only DEFLATED entries can have EXT descriptor
at java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:310)
at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:122)
at Alan.streamToUnzipFile(Alan.java:59)
at Alan.main(Alan.java:29)
https://github.com/archiverjs/node-compress-commons/blob/master/lib/archivers/zip/zip-archive-output-stream.js#L63 should already handle empty Buffers and strings. We dont know a streams length though until its fully consumed.