@zip.js/zip.js 2.7.9 → 2.7.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/zip-fs-full.js +3 -2
- package/dist/zip-fs-full.min.js +1 -1
- package/dist/zip-fs.js +3 -2
- package/dist/zip-fs.min.js +1 -1
- package/index.cjs +3 -2
- package/index.d.ts +4 -4
- package/lib/core/zip-fs-core.js +3 -2
- package/package.json +1 -1
package/lib/core/zip-fs-core.js
CHANGED
|
@@ -140,7 +140,8 @@ class ZipFileEntry extends ZipEntry {
|
|
|
140
140
|
return zipEntry.data;
|
|
141
141
|
} else {
|
|
142
142
|
const reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);
|
|
143
|
-
|
|
143
|
+
const uncompressedSize = zipEntry.data ? zipEntry.data.uncompressedSize : reader.size;
|
|
144
|
+
await Promise.all([initStream(reader), initStream(writer, uncompressedSize)]);
|
|
144
145
|
const readable = reader.readable;
|
|
145
146
|
readable.size = zipEntry.uncompressedSize = reader.size;
|
|
146
147
|
await readable.pipeTo(writer.writable);
|
|
@@ -740,7 +741,7 @@ async function exportZip(zipWriter, entry, totalSize, options) {
|
|
|
740
741
|
}
|
|
741
742
|
|
|
742
743
|
async function addFileSystemHandle(zipEntry, handle, options) {
|
|
743
|
-
|
|
744
|
+
return addFile(zipEntry, handle, []);
|
|
744
745
|
|
|
745
746
|
async function addFile(parentEntry, handle, addedEntries) {
|
|
746
747
|
try {
|
package/package.json
CHANGED