@zip.js/zip.js 2.11.0 → 2.11.1
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/deno.json +1 -1
- package/dist/zip-core-external.js +11 -14
- package/dist/zip-core-external.min.js +1 -1
- package/dist/zip-core.js +1 -1
- package/dist/zip-core.min.js +1 -1
- package/dist/zip-fs-core-external.js +11 -14
- package/dist/zip-fs-core-external.min.js +1 -1
- package/dist/zip-fs-core.js +1 -1
- package/dist/zip-fs-core.min.js +1 -1
- package/dist/zip-fs-external.js +11 -14
- package/dist/zip-fs-external.min.js +1 -1
- package/dist/zip-fs-native.js +1 -1
- package/dist/zip-fs-native.min.js +1 -1
- package/dist/zip-fs.js +14 -17
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-legacy.js +1 -1
- package/dist/zip-legacy.min.js +1 -1
- package/dist/zip-module.wasm +0 -0
- package/dist/zip-native.js +1 -1
- package/dist/zip-native.min.js +1 -1
- package/dist/zip-web-worker.js +1 -1
- package/dist/zip.js +14 -17
- package/dist/zip.min.js +1 -1
- package/eslint.config.mjs +1 -1
- package/index-native.cjs +1 -1
- package/index-native.min.js +1 -1
- package/index.cjs +14 -17
- package/index.min.js +1 -1
- package/lib/core/streams/zlib-wasm/zlib-streams.js +10 -13
- package/lib/core/streams/zlib-wasm/zlib-streams.wasm +0 -0
- package/lib/core/version.js +1 -1
- package/lib/core/web-worker-inline-wasm.js +1 -1
- package/lib/core/zlib-streams-inline.js +1 -1
- package/package.json +4 -2
package/dist/zip-fs-external.js
CHANGED
|
@@ -8626,7 +8626,7 @@ function formatSupported(StreamClass, format) {
|
|
|
8626
8626
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
8627
8627
|
*/
|
|
8628
8628
|
|
|
8629
|
-
const VERSION = "2.11.
|
|
8629
|
+
const VERSION = "2.11.1";
|
|
8630
8630
|
|
|
8631
8631
|
/*
|
|
8632
8632
|
Copyright (c) 2025 Gildas Lormeau. All rights reserved.
|
|
@@ -9215,18 +9215,17 @@ function _make(isCompress, type, options = {}) {
|
|
|
9215
9215
|
}
|
|
9216
9216
|
heap.set(buffer.subarray(offset, offset + toRead), this.in);
|
|
9217
9217
|
const result = process(this.streamHandle, this.in, toRead, out, outBufferSize, 0);
|
|
9218
|
+
// checked before the byte count is used, so a status code can never be read as one
|
|
9219
|
+
const code = (result >> 24) & 0xff;
|
|
9220
|
+
const signedCode = (code & 0x80) ? code - 256 : code;
|
|
9221
|
+
if (signedCode < 0) {
|
|
9222
|
+
throw new Error("process error:" + signedCode);
|
|
9223
|
+
}
|
|
9218
9224
|
const prod = result & 0x00ffffff;
|
|
9219
9225
|
if (prod) {
|
|
9220
9226
|
scratch.set(heap.subarray(out, out + prod), 0);
|
|
9221
9227
|
controller.enqueue(scratch.slice(0, prod));
|
|
9222
9228
|
}
|
|
9223
|
-
if (!isCompress) {
|
|
9224
|
-
const code = (result >> 24) & 0xff;
|
|
9225
|
-
const signedCode = (code & 0x80) ? code - 256 : code;
|
|
9226
|
-
if (signedCode < 0) {
|
|
9227
|
-
throw new Error("process error:" + signedCode);
|
|
9228
|
-
}
|
|
9229
|
-
}
|
|
9230
9229
|
const consumed = last_consumed(this.streamHandle);
|
|
9231
9230
|
if (consumed === 0 && prod === 0) {
|
|
9232
9231
|
break;
|
|
@@ -9246,14 +9245,12 @@ function _make(isCompress, type, options = {}) {
|
|
|
9246
9245
|
const scratch = this._scratch;
|
|
9247
9246
|
while (true) {
|
|
9248
9247
|
const result = process(this.streamHandle, 0, 0, out, outBufferSize, 4);
|
|
9249
|
-
const produced = result & 0x00ffffff;
|
|
9250
9248
|
const code = (result >> 24) & 0xff;
|
|
9251
|
-
|
|
9252
|
-
|
|
9253
|
-
|
|
9254
|
-
throw new Error("process error:" + signedCode);
|
|
9255
|
-
}
|
|
9249
|
+
const signedCode = (code & 0x80) ? code - 256 : code;
|
|
9250
|
+
if (signedCode < 0) {
|
|
9251
|
+
throw new Error("process error:" + signedCode);
|
|
9256
9252
|
}
|
|
9253
|
+
const produced = result & 0x00ffffff;
|
|
9257
9254
|
if (produced) {
|
|
9258
9255
|
scratch.set(heap.subarray(out, out + produced), 0);
|
|
9259
9256
|
controller.enqueue(scratch.slice(0, produced));
|