@zip.js/zip.js 2.16.1 → 2.18.0
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 +211 -130
- package/dist/zip-core-external.min.js +1 -1
- package/dist/zip-core.js +180 -117
- package/dist/zip-core.min.js +1 -1
- package/dist/zip-fs-core-external.js +223 -132
- package/dist/zip-fs-core-external.min.js +1 -1
- package/dist/zip-fs-core.js +192 -119
- package/dist/zip-fs-core.min.js +1 -1
- package/dist/zip-fs-external.js +223 -132
- package/dist/zip-fs-external.min.js +1 -1
- package/dist/zip-fs-native.js +194 -121
- package/dist/zip-fs-native.min.js +1 -1
- package/dist/zip-fs.js +224 -132
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-legacy.js +181 -118
- package/dist/zip-legacy.min.js +1 -1
- package/dist/zip-native.js +182 -119
- package/dist/zip-native.min.js +1 -1
- package/dist/zip-web-worker-native.js +1 -1
- package/dist/zip-web-worker.js +1 -1
- package/dist/zip.js +212 -130
- package/dist/zip.min.js +1 -1
- package/index-native.cjs +194 -121
- package/index-native.min.js +1 -1
- package/index.cjs +224 -132
- package/index.d.cts +87 -24
- package/index.d.ts +87 -24
- package/index.min.js +1 -1
- package/lib/core/codec-pool.js +2 -0
- package/lib/core/codec-worker-web.js +16 -3
- package/lib/core/codec-worker.js +2 -1
- package/lib/core/streams/codec-stream.js +2 -0
- package/lib/core/streams/zip-entry-stream.js +123 -102
- package/lib/core/streams/zlib-js/zlib-streams.min.js +1 -1
- package/lib/core/streams/zlib-wasm/zlib-streams.js +31 -12
- package/lib/core/version.js +1 -1
- package/lib/core/web-worker-base.js +2 -2
- package/lib/core/web-worker-inline-native.js +1 -1
- package/lib/core/web-worker-inline-wasm.js +1 -1
- package/lib/core/zip-fs.js +16 -3
- package/lib/core/zip-reader.js +40 -11
- package/lib/core/zip-writer.js +1 -0
- package/lib/zip-core-reader.js +1 -0
- package/package.json +1 -1
|
@@ -1931,7 +1931,9 @@ async function ensureCodecStreams(format, codecURI) {
|
|
|
1931
1931
|
|
|
1932
1932
|
const ERR_INVALID_UNCOMPRESSED_SIZE = "Invalid uncompressed size";
|
|
1933
1933
|
const ERR_INVALID_COMPRESSED_DATA = "Invalid compressed data";
|
|
1934
|
+
const ERR_CODEC_OUT_OF_MEMORY = "Codec out of memory";
|
|
1934
1935
|
const ERR_INVALID_CRC32 = "Invalid CRC32";
|
|
1936
|
+
const Z_MEM_ERROR_CODE$1 = "Z_MEM_ERROR";
|
|
1935
1937
|
const FORMAT_DEFLATE_RAW$1 = "deflate-raw";
|
|
1936
1938
|
const FORMAT_DEFLATE64_RAW$1 = "deflate64-raw";
|
|
1937
1939
|
const FORMAT_GZIP$1 = "gzip";
|
|
@@ -1966,13 +1968,13 @@ class DeflateStream extends TransformStream {
|
|
|
1966
1968
|
readable = pipeThroughCompressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStream, CompressionStreamFallback);
|
|
1967
1969
|
} catch (error) {
|
|
1968
1970
|
if (!useCompressionStream && CompressionStreamFallback) {
|
|
1969
|
-
throw error;
|
|
1971
|
+
throw mapMemoryError(error);
|
|
1970
1972
|
}
|
|
1971
1973
|
let gzipStream;
|
|
1972
1974
|
try {
|
|
1973
1975
|
gzipStream = new CompressionStream(FORMAT_GZIP$1);
|
|
1974
1976
|
} catch {
|
|
1975
|
-
throw error;
|
|
1977
|
+
throw mapMemoryError(error);
|
|
1976
1978
|
}
|
|
1977
1979
|
readable = pipeThroughBackpressured(readable, gzipStream);
|
|
1978
1980
|
readable = pipeThrough(readable, new GzipToRawDeflateStream());
|
|
@@ -2036,50 +2038,30 @@ class GzipToRawDeflateStream extends TransformStream {
|
|
|
2036
2038
|
}
|
|
2037
2039
|
}
|
|
2038
2040
|
|
|
2039
|
-
function pipeThroughGzipDecompressionStream(readable, gzipStream, outputSize, crc32) {
|
|
2041
|
+
function pipeThroughGzipDecompressionStream(readable, gzipStream, outputSize, crc32, sourceErrors) {
|
|
2040
2042
|
const writer = gzipStream.writable.getWriter();
|
|
2041
2043
|
const reader = gzipStream.readable.getReader();
|
|
2042
2044
|
const outputCrc32 = crc32 === UNDEFINED_VALUE ? new Crc32() : UNDEFINED_VALUE;
|
|
2043
2045
|
let outputLength = 0;
|
|
2044
|
-
let inputDone = false;
|
|
2045
2046
|
let trailerWritten = false;
|
|
2046
|
-
let
|
|
2047
|
-
let
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
trailerReady.catch(() => { });
|
|
2055
|
-
pump();
|
|
2056
|
-
return new ReadableStream({
|
|
2057
|
-
async pull(controller) {
|
|
2058
|
-
try {
|
|
2059
|
-
const { value, done } = await read();
|
|
2060
|
-
if (done) {
|
|
2061
|
-
controller.close();
|
|
2062
|
-
} else {
|
|
2063
|
-
outputLength += value.length;
|
|
2064
|
-
if (outputLength > outputSize) {
|
|
2065
|
-
throw new Error(ERR_INVALID_UNCOMPRESSED_SIZE);
|
|
2066
|
-
}
|
|
2067
|
-
if (outputCrc32) {
|
|
2068
|
-
outputCrc32.append(value);
|
|
2069
|
-
}
|
|
2070
|
-
controller.enqueue(value);
|
|
2071
|
-
}
|
|
2072
|
-
} catch (error) {
|
|
2073
|
-
rejectTrailerReady(error);
|
|
2074
|
-
await cancel(reader, error);
|
|
2075
|
-
throw trailerWritten ? getTrailerError(error) : error;
|
|
2076
|
-
}
|
|
2047
|
+
let settled = false;
|
|
2048
|
+
let resolvePull, controller;
|
|
2049
|
+
const output = new ReadableStream({
|
|
2050
|
+
start(streamController) {
|
|
2051
|
+
controller = streamController;
|
|
2052
|
+
},
|
|
2053
|
+
pull() {
|
|
2054
|
+
resumePump();
|
|
2077
2055
|
},
|
|
2078
2056
|
cancel(reason) {
|
|
2079
|
-
|
|
2057
|
+
settled = true;
|
|
2058
|
+
resumePump();
|
|
2080
2059
|
return reader.cancel(reason);
|
|
2081
2060
|
}
|
|
2082
2061
|
});
|
|
2062
|
+
pump();
|
|
2063
|
+
drain();
|
|
2064
|
+
return output;
|
|
2083
2065
|
|
|
2084
2066
|
async function pump() {
|
|
2085
2067
|
const inputReader = readable.getReader();
|
|
@@ -2088,19 +2070,16 @@ function pipeThroughGzipDecompressionStream(readable, gzipStream, outputSize, cr
|
|
|
2088
2070
|
header.set(GZIP_HEADER_BYTES);
|
|
2089
2071
|
await writer.write(header);
|
|
2090
2072
|
for (; ;) {
|
|
2073
|
+
await outputCapacity();
|
|
2091
2074
|
await writer.ready;
|
|
2092
|
-
const { value, done } = await inputReader
|
|
2075
|
+
const { value, done } = await readSource(inputReader, sourceErrors);
|
|
2093
2076
|
if (done) {
|
|
2094
2077
|
break;
|
|
2095
2078
|
}
|
|
2096
2079
|
await writer.write(value);
|
|
2097
2080
|
}
|
|
2098
|
-
inputDone = true;
|
|
2099
2081
|
if (outputCrc32) {
|
|
2100
|
-
|
|
2101
|
-
armIdleCheck();
|
|
2102
|
-
}
|
|
2103
|
-
await trailerReady;
|
|
2082
|
+
await writer.write(new Uint8Array(0));
|
|
2104
2083
|
}
|
|
2105
2084
|
const trailer = new Uint8Array(GZIP_TRAILER_LENGTH);
|
|
2106
2085
|
const dataView = getDataView(trailer);
|
|
@@ -2115,54 +2094,68 @@ function pipeThroughGzipDecompressionStream(readable, gzipStream, outputSize, cr
|
|
|
2115
2094
|
}
|
|
2116
2095
|
}
|
|
2117
2096
|
|
|
2118
|
-
function
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2097
|
+
async function drain() {
|
|
2098
|
+
try {
|
|
2099
|
+
for (; ;) {
|
|
2100
|
+
const { value, done } = await read();
|
|
2101
|
+
if (done) {
|
|
2102
|
+
break;
|
|
2103
|
+
}
|
|
2104
|
+
outputLength += value.length;
|
|
2105
|
+
if (outputLength > outputSize) {
|
|
2106
|
+
throw new Error(ERR_INVALID_UNCOMPRESSED_SIZE);
|
|
2107
|
+
}
|
|
2108
|
+
if (outputCrc32) {
|
|
2109
|
+
outputCrc32.append(value);
|
|
2110
|
+
}
|
|
2111
|
+
controller.enqueue(value);
|
|
2112
|
+
}
|
|
2113
|
+
if (!settled) {
|
|
2114
|
+
settled = true;
|
|
2115
|
+
controller.close();
|
|
2116
|
+
}
|
|
2117
|
+
} catch (error) {
|
|
2118
|
+
fail(error);
|
|
2119
|
+
await cancel(reader, error);
|
|
2125
2120
|
}
|
|
2126
|
-
return result;
|
|
2127
|
-
}
|
|
2128
|
-
|
|
2129
|
-
function onReadSettled() {
|
|
2130
|
-
readPending = false;
|
|
2131
2121
|
}
|
|
2132
2122
|
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
resolveTrailerReady();
|
|
2142
|
-
} else {
|
|
2143
|
-
armIdleCheck();
|
|
2123
|
+
function read() {
|
|
2124
|
+
return reader.read().catch(error => {
|
|
2125
|
+
if (trailerWritten) {
|
|
2126
|
+
if (!outputCrc32) {
|
|
2127
|
+
throw mapError(error, ERR_INVALID_CRC32);
|
|
2128
|
+
}
|
|
2129
|
+
if (outputLength != outputSize) {
|
|
2130
|
+
throw mapError(error, ERR_INVALID_UNCOMPRESSED_SIZE);
|
|
2144
2131
|
}
|
|
2132
|
+
return { done: true };
|
|
2145
2133
|
}
|
|
2146
|
-
|
|
2134
|
+
throw mapCodecError(error, sourceErrors);
|
|
2135
|
+
});
|
|
2147
2136
|
}
|
|
2148
2137
|
|
|
2149
|
-
function
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2138
|
+
function outputCapacity() {
|
|
2139
|
+
if (!settled && controller.desiredSize <= 0) {
|
|
2140
|
+
return new Promise(resolve => resolvePull = resolve);
|
|
2141
|
+
}
|
|
2153
2142
|
}
|
|
2154
|
-
}
|
|
2155
2143
|
|
|
2156
|
-
function
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
port1.close();
|
|
2161
|
-
port2.close();
|
|
2144
|
+
function resumePump() {
|
|
2145
|
+
if (resolvePull) {
|
|
2146
|
+
const resolve = resolvePull;
|
|
2147
|
+
resolvePull = UNDEFINED_VALUE;
|
|
2162
2148
|
resolve();
|
|
2163
|
-
}
|
|
2164
|
-
|
|
2165
|
-
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
function fail(error) {
|
|
2153
|
+
if (!settled) {
|
|
2154
|
+
settled = true;
|
|
2155
|
+
controller.error(error);
|
|
2156
|
+
resumePump();
|
|
2157
|
+
}
|
|
2158
|
+
}
|
|
2166
2159
|
}
|
|
2167
2160
|
|
|
2168
2161
|
class InflateStream extends TransformStream {
|
|
@@ -2181,11 +2174,12 @@ class InflateStream extends TransformStream {
|
|
|
2181
2174
|
}
|
|
2182
2175
|
}
|
|
2183
2176
|
if (compressed) {
|
|
2177
|
+
const sourceErrors = new Set();
|
|
2184
2178
|
const codecStreams = format && getCodecStreams(format);
|
|
2179
|
+
let gzipStream;
|
|
2185
2180
|
if (codecStreams) {
|
|
2186
|
-
readable = pipeThroughBackpressured(readable, createCodecStream(codecStreams.DecompressionStream, format, { chunkSize, compressionMethod, rawBitFlag, uncompressedSize: outputSize }));
|
|
2181
|
+
readable = pipeThroughBackpressured(readable, createCodecStream(codecStreams.DecompressionStream, format, { chunkSize, compressionMethod, rawBitFlag, uncompressedSize: outputSize }), sourceErrors);
|
|
2187
2182
|
} else {
|
|
2188
|
-
let gzipStream;
|
|
2189
2183
|
const GzipDecompressionStream = getGzipCodecStream(useCompressionStream, DecompressionStream, DecompressionStreamFallback);
|
|
2190
2184
|
if (checkCrc32 && !deflate64 && crc32 !== UNDEFINED_VALUE && outputSize !== UNDEFINED_VALUE && GzipDecompressionStream) {
|
|
2191
2185
|
try {
|
|
@@ -2196,24 +2190,25 @@ class InflateStream extends TransformStream {
|
|
|
2196
2190
|
}
|
|
2197
2191
|
if (!gzipStream) {
|
|
2198
2192
|
try {
|
|
2199
|
-
readable = pipeThroughCompressionStream(readable, useCompressionStream, { chunkSize, deflate64 }, DecompressionStream, DecompressionStreamFallback);
|
|
2193
|
+
readable = pipeThroughCompressionStream(readable, useCompressionStream, { chunkSize, deflate64 }, DecompressionStream, DecompressionStreamFallback, sourceErrors);
|
|
2200
2194
|
} catch (error) {
|
|
2201
2195
|
if (deflate64 || outputSize === UNDEFINED_VALUE || (!useCompressionStream && DecompressionStreamFallback)) {
|
|
2202
|
-
throw error;
|
|
2196
|
+
throw mapMemoryError(error);
|
|
2203
2197
|
}
|
|
2204
2198
|
try {
|
|
2205
2199
|
gzipStream = new DecompressionStream(FORMAT_GZIP$1);
|
|
2206
2200
|
} catch {
|
|
2207
|
-
throw error;
|
|
2201
|
+
throw mapMemoryError(error);
|
|
2208
2202
|
}
|
|
2209
2203
|
}
|
|
2210
2204
|
}
|
|
2211
|
-
if (gzipStream) {
|
|
2212
|
-
gzipCrc32 = true;
|
|
2213
|
-
readable = pipeThroughGzipDecompressionStream(readable, gzipStream, outputSize, crc32);
|
|
2214
|
-
}
|
|
2215
2205
|
}
|
|
2216
|
-
|
|
2206
|
+
if (gzipStream) {
|
|
2207
|
+
gzipCrc32 = true;
|
|
2208
|
+
readable = pipeThroughGzipDecompressionStream(readable, gzipStream, outputSize, crc32, sourceErrors);
|
|
2209
|
+
} else {
|
|
2210
|
+
readable = mapInflateStreamError(readable, sourceErrors);
|
|
2211
|
+
}
|
|
2217
2212
|
}
|
|
2218
2213
|
if (checkCrc32 && !gzipCrc32) {
|
|
2219
2214
|
crc32Stream = new Crc32Stream();
|
|
@@ -2286,7 +2281,7 @@ function getGzipCodecStream(useCompressionStream, CodecStreamNative, CodecStream
|
|
|
2286
2281
|
}
|
|
2287
2282
|
}
|
|
2288
2283
|
|
|
2289
|
-
function pipeThroughCompressionStream(readable, useCompressionStream, options, CompressionStreamNative, CompressionStreamFallback) {
|
|
2284
|
+
function pipeThroughCompressionStream(readable, useCompressionStream, options, CompressionStreamNative, CompressionStreamFallback, sourceErrors) {
|
|
2290
2285
|
const Stream = useCompressionStream && CompressionStreamNative ?
|
|
2291
2286
|
CompressionStreamNative :
|
|
2292
2287
|
CompressionStreamFallback || CompressionStreamNative;
|
|
@@ -2301,14 +2296,14 @@ function pipeThroughCompressionStream(readable, useCompressionStream, options, C
|
|
|
2301
2296
|
throw error;
|
|
2302
2297
|
}
|
|
2303
2298
|
}
|
|
2304
|
-
return pipeThroughBackpressured(readable, codecStream);
|
|
2299
|
+
return pipeThroughBackpressured(readable, codecStream, sourceErrors);
|
|
2305
2300
|
}
|
|
2306
2301
|
|
|
2307
2302
|
function pipeThrough(readable, transformStream) {
|
|
2308
2303
|
return toCompatibleReadable(readable).pipeThrough(transformStream);
|
|
2309
2304
|
}
|
|
2310
2305
|
|
|
2311
|
-
function pipeThroughBackpressured(readable, transformStream) {
|
|
2306
|
+
function pipeThroughBackpressured(readable, transformStream, sourceErrors) {
|
|
2312
2307
|
const writer = transformStream.writable.getWriter();
|
|
2313
2308
|
const reader = readable.getReader();
|
|
2314
2309
|
pump();
|
|
@@ -2318,7 +2313,7 @@ function pipeThroughBackpressured(readable, transformStream) {
|
|
|
2318
2313
|
try {
|
|
2319
2314
|
for (; ;) {
|
|
2320
2315
|
await writer.ready;
|
|
2321
|
-
const result = await reader
|
|
2316
|
+
const result = await readSource(reader, sourceErrors);
|
|
2322
2317
|
if (result.done) {
|
|
2323
2318
|
await writer.close();
|
|
2324
2319
|
break;
|
|
@@ -2348,7 +2343,36 @@ async function cancel(reader, error) {
|
|
|
2348
2343
|
}
|
|
2349
2344
|
}
|
|
2350
2345
|
|
|
2351
|
-
function
|
|
2346
|
+
function readSource(reader, sourceErrors) {
|
|
2347
|
+
const result = reader.read();
|
|
2348
|
+
return sourceErrors ? result.catch(error => {
|
|
2349
|
+
sourceErrors.add(error);
|
|
2350
|
+
throw error;
|
|
2351
|
+
}) : result;
|
|
2352
|
+
}
|
|
2353
|
+
|
|
2354
|
+
function mapCodecError(error, sourceErrors) {
|
|
2355
|
+
if (sourceErrors.has(error)) {
|
|
2356
|
+
return error;
|
|
2357
|
+
}
|
|
2358
|
+
return mapError(error, isMemoryError(error) ? ERR_CODEC_OUT_OF_MEMORY : ERR_INVALID_COMPRESSED_DATA);
|
|
2359
|
+
}
|
|
2360
|
+
|
|
2361
|
+
function mapMemoryError(error) {
|
|
2362
|
+
return isMemoryError(error) ? mapError(error, ERR_CODEC_OUT_OF_MEMORY) : error;
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2365
|
+
function isMemoryError(error) {
|
|
2366
|
+
return isErrorObject(error) && error.code == Z_MEM_ERROR_CODE$1;
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
function mapError(error, message) {
|
|
2370
|
+
const mappedError = new Error(message);
|
|
2371
|
+
mappedError.cause = error;
|
|
2372
|
+
return mappedError;
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2375
|
+
function mapInflateStreamError(readable, sourceErrors) {
|
|
2352
2376
|
const reader = readable.getReader();
|
|
2353
2377
|
return new ReadableStream({
|
|
2354
2378
|
async pull(controller) {
|
|
@@ -2361,12 +2385,7 @@ function mapInflateStreamError(readable) {
|
|
|
2361
2385
|
}
|
|
2362
2386
|
} catch (error) {
|
|
2363
2387
|
await cancel(reader, error);
|
|
2364
|
-
|
|
2365
|
-
throw error;
|
|
2366
|
-
}
|
|
2367
|
-
const mappedError = new Error(ERR_INVALID_COMPRESSED_DATA);
|
|
2368
|
-
mappedError.cause = error;
|
|
2369
|
-
throw mappedError;
|
|
2388
|
+
throw mapCodecError(error, sourceErrors);
|
|
2370
2389
|
}
|
|
2371
2390
|
},
|
|
2372
2391
|
cancel(reason) {
|
|
@@ -2734,10 +2753,11 @@ async function runWorker$1({ options, readable, writable, onTaskFinished, worker
|
|
|
2734
2753
|
}
|
|
2735
2754
|
codecStream = new CodecStream(options, config);
|
|
2736
2755
|
chunkStream = new ChunkStream(getChunkSize(config));
|
|
2756
|
+
const { signal } = workerOptions.streamOptions;
|
|
2737
2757
|
await readable
|
|
2738
2758
|
.pipeThrough(codecStream)
|
|
2739
2759
|
.pipeThrough(chunkStream)
|
|
2740
|
-
.pipeTo(writable, { preventClose: true, preventAbort: true });
|
|
2760
|
+
.pipeTo(writable, { preventClose: true, preventAbort: true, signal });
|
|
2741
2761
|
const {
|
|
2742
2762
|
crc32,
|
|
2743
2763
|
inputSize,
|
|
@@ -2805,6 +2825,7 @@ async function runWorker$1({ options, readable, writable, onTaskFinished, worker
|
|
|
2805
2825
|
const MODULE_WORKER_OPTIONS = { type: "module" };
|
|
2806
2826
|
const ERROR_EVENT_TYPE = "error";
|
|
2807
2827
|
const MESSAGE_ERROR_EVENT_TYPE = "messageerror";
|
|
2828
|
+
const ABORT_EVENT_TYPE = "abort";
|
|
2808
2829
|
|
|
2809
2830
|
let webWorkerSource, webWorkerURI, webWorkerOptions;
|
|
2810
2831
|
let transferStreamsSupported = true;
|
|
@@ -2981,6 +3002,13 @@ function watchClosedStream(writableSource, workerData) {
|
|
|
2981
3002
|
Object.assign(workerData, { destinationFailed: true, destinationError: error });
|
|
2982
3003
|
}
|
|
2983
3004
|
});
|
|
3005
|
+
const { signal } = workerData.workerOptions.streamOptions;
|
|
3006
|
+
if (signal) {
|
|
3007
|
+
const onAbort = () => abortController.abort(signal.reason);
|
|
3008
|
+
const removeAbortListener = () => signal.removeEventListener(ABORT_EVENT_TYPE, onAbort);
|
|
3009
|
+
signal.addEventListener(ABORT_EVENT_TYPE, onAbort);
|
|
3010
|
+
closed.then(removeAbortListener, removeAbortListener);
|
|
3011
|
+
}
|
|
2984
3012
|
return {
|
|
2985
3013
|
writable, closed, abortPipe: () => {
|
|
2986
3014
|
aborting = true;
|
|
@@ -3243,9 +3271,6 @@ function getResponseError(errorData, errorValue) {
|
|
|
3243
3271
|
responseError = errorValue.value;
|
|
3244
3272
|
} else {
|
|
3245
3273
|
responseError = Object.assign(new Error(message), { stack, code, name });
|
|
3246
|
-
if (cause) {
|
|
3247
|
-
responseError.cause = Object.assign(new Error(cause.message), { name: cause.name });
|
|
3248
|
-
}
|
|
3249
3274
|
}
|
|
3250
3275
|
if (isErrorObject(responseError)) {
|
|
3251
3276
|
try {
|
|
@@ -3255,6 +3280,14 @@ function getResponseError(errorData, errorValue) {
|
|
|
3255
3280
|
if (codecImportFailed) {
|
|
3256
3281
|
responseError.codecImportFailed = true;
|
|
3257
3282
|
}
|
|
3283
|
+
if (cause) {
|
|
3284
|
+
if (!isErrorObject(responseError.cause)) {
|
|
3285
|
+
responseError.cause = Object.assign(new Error(cause.message), { name: cause.name });
|
|
3286
|
+
}
|
|
3287
|
+
if (cause.code !== UNDEFINED_VALUE && responseError.cause.code !== cause.code) {
|
|
3288
|
+
responseError.cause.code = cause.code;
|
|
3289
|
+
}
|
|
3290
|
+
}
|
|
3258
3291
|
if (errorValue) {
|
|
3259
3292
|
if (responseError.name !== name) {
|
|
3260
3293
|
responseError.name = name;
|
|
@@ -4845,7 +4878,7 @@ const PARENT_DIRECTORY_REGEXP = /(^|[\\/])\.\.([\\/]|$)/;
|
|
|
4845
4878
|
const CHARSET_UTF8 = "utf-8";
|
|
4846
4879
|
const PROPERTY_NAME_UTF8_SUFFIX = "UTF8";
|
|
4847
4880
|
const CHARSET_CP437 = "cp437";
|
|
4848
|
-
const BITFLAG_AMBIGUITY_MASK = BITFLAG_ENCRYPTED | BITFLAG_DATA_DESCRIPTOR | BITFLAG_LANG_ENCODING_FLAG;
|
|
4881
|
+
const BITFLAG_AMBIGUITY_MASK = BITFLAG_ENCRYPTED | BITFLAG_DATA_DESCRIPTOR | BITFLAG_STRONG_ENCRYPTION | BITFLAG_LANG_ENCODING_FLAG;
|
|
4849
4882
|
const VENDOR_VERSION_AE_1$1 = 1;
|
|
4850
4883
|
const ZIP64_PROPERTIES = [
|
|
4851
4884
|
[PROPERTY_NAME_UNCOMPRESSED_SIZE, MAX_32_BITS],
|
|
@@ -5499,12 +5532,12 @@ let ZipEntry$1 = class ZipEntry {
|
|
|
5499
5532
|
fileEntry.gid = gid;
|
|
5500
5533
|
}
|
|
5501
5534
|
const checkPasswordOnly = getOptionValue$1(zipEntry, options, OPTION_CHECK_PASSWORD_ONLY);
|
|
5502
|
-
const encrypted = zipEntry.encrypted &&
|
|
5535
|
+
const encrypted = zipEntry.encrypted && (!passThroughEncryption || checkPasswordOnly);
|
|
5503
5536
|
const zipCrypto = encrypted && !extraFieldAES;
|
|
5504
5537
|
if (!passThroughEncryption) {
|
|
5505
5538
|
fileEntry.zipCrypto = zipCrypto;
|
|
5506
5539
|
}
|
|
5507
|
-
if (encrypted && (
|
|
5540
|
+
if (encrypted && (zipEntry.rawBitFlag & BITFLAG_STRONG_ENCRYPTION) == BITFLAG_STRONG_ENCRYPTION) {
|
|
5508
5541
|
throw new Error(ERR_UNSUPPORTED_ENCRYPTION);
|
|
5509
5542
|
}
|
|
5510
5543
|
const registeredCodec = passThroughCompression ? UNDEFINED_VALUE : getRegisteredCodec(compressionMethod);
|
|
@@ -5597,6 +5630,7 @@ let ZipEntry$1 = class ZipEntry {
|
|
|
5597
5630
|
({ writable } = writer);
|
|
5598
5631
|
const readable = toCompatibleReadable(reader.createReadable({ offset: dataOffset, size }));
|
|
5599
5632
|
const { outputSize: writtenSize } = await runWorker({ readable, writable }, workerOptions);
|
|
5633
|
+
throwIfAborted(signal);
|
|
5600
5634
|
if (writtenSize != outputSize) {
|
|
5601
5635
|
throw Object.assign(new Error(ERR_INVALID_UNCOMPRESSED_SIZE), { outputSize: writtenSize });
|
|
5602
5636
|
}
|
|
@@ -5743,8 +5777,16 @@ function readCommonFooter(fileEntry, directory, dataView, offset, localDirectory
|
|
|
5743
5777
|
});
|
|
5744
5778
|
const extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);
|
|
5745
5779
|
if (extraFieldZip64) {
|
|
5746
|
-
readExtraFieldZip64(extraFieldZip64, directory)
|
|
5780
|
+
if (!readExtraFieldZip64(extraFieldZip64, directory, localDirectory)) {
|
|
5781
|
+
malformedExtraField = true;
|
|
5782
|
+
}
|
|
5747
5783
|
directory.extraFieldZip64 = extraFieldZip64;
|
|
5784
|
+
} else if (ZIP64_PROPERTIES.some(([propertyName, max]) => directory[propertyName] == max)) {
|
|
5785
|
+
if (localDirectory) {
|
|
5786
|
+
malformedExtraField = true;
|
|
5787
|
+
} else {
|
|
5788
|
+
throw new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);
|
|
5789
|
+
}
|
|
5748
5790
|
}
|
|
5749
5791
|
const extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);
|
|
5750
5792
|
if (extraFieldUnicodePath) {
|
|
@@ -5757,10 +5799,13 @@ function readCommonFooter(fileEntry, directory, dataView, offset, localDirectory
|
|
|
5757
5799
|
directory.extraFieldUnicodeComment = extraFieldUnicodeComment;
|
|
5758
5800
|
}
|
|
5759
5801
|
const extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);
|
|
5760
|
-
if (extraFieldAES && extraFieldAES.data.length >= 7) {
|
|
5802
|
+
if (extraFieldAES && (compressionMethod == COMPRESSION_METHOD_AES || directory.encrypted) && extraFieldAES.data.length >= 7) {
|
|
5761
5803
|
readExtraFieldAES(extraFieldAES, directory, compressionMethod);
|
|
5762
5804
|
directory.extraFieldAES = extraFieldAES;
|
|
5763
5805
|
} else {
|
|
5806
|
+
if (extraFieldAES) {
|
|
5807
|
+
malformedExtraField = true;
|
|
5808
|
+
}
|
|
5764
5809
|
directory.compressionMethod = compressionMethod;
|
|
5765
5810
|
}
|
|
5766
5811
|
const extraFieldPkwareUnix = extraField.get(EXTRAFIELD_TYPE_PKWARE_UNIX);
|
|
@@ -5803,20 +5848,35 @@ function readCommonFooter(fileEntry, directory, dataView, offset, localDirectory
|
|
|
5803
5848
|
return malformedExtraField;
|
|
5804
5849
|
}
|
|
5805
5850
|
|
|
5806
|
-
function readExtraFieldZip64(extraFieldZip64, directory) {
|
|
5851
|
+
function readExtraFieldZip64(extraFieldZip64, directory, localDirectory) {
|
|
5807
5852
|
directory.zip64 = true;
|
|
5808
5853
|
const extraFieldView = getDataView(extraFieldZip64.data);
|
|
5809
5854
|
const missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);
|
|
5810
5855
|
const requiredLength = missingProperties.reduce((length, [, max]) => length + ZIP64_EXTRACTION[max].bytes, 0);
|
|
5811
5856
|
if (extraFieldZip64.data.length < requiredLength) {
|
|
5857
|
+
if (localDirectory) {
|
|
5858
|
+
return false;
|
|
5859
|
+
}
|
|
5812
5860
|
throw new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);
|
|
5813
5861
|
}
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5862
|
+
const values = [];
|
|
5863
|
+
try {
|
|
5864
|
+
for (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {
|
|
5865
|
+
const [, max] = missingProperties[indexMissingProperty];
|
|
5866
|
+
const extraction = ZIP64_EXTRACTION[max];
|
|
5867
|
+
values.push(extraction.getValue(extraFieldView, offset));
|
|
5868
|
+
offset += extraction.bytes;
|
|
5869
|
+
}
|
|
5870
|
+
} catch (error) {
|
|
5871
|
+
if (localDirectory) {
|
|
5872
|
+
return false;
|
|
5873
|
+
}
|
|
5874
|
+
throw error;
|
|
5819
5875
|
}
|
|
5876
|
+
missingProperties.forEach(([propertyName], indexMissingProperty) => {
|
|
5877
|
+
directory[propertyName] = extraFieldZip64[propertyName] = values[indexMissingProperty];
|
|
5878
|
+
});
|
|
5879
|
+
return true;
|
|
5820
5880
|
}
|
|
5821
5881
|
|
|
5822
5882
|
function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {
|
|
@@ -6392,6 +6452,7 @@ var zipReader = /*#__PURE__*/Object.freeze({
|
|
|
6392
6452
|
ERR_AMBIGUOUS_ARCHIVE: ERR_AMBIGUOUS_ARCHIVE,
|
|
6393
6453
|
ERR_BAD_FORMAT: ERR_BAD_FORMAT,
|
|
6394
6454
|
ERR_CENTRAL_DIRECTORY_NOT_FOUND: ERR_CENTRAL_DIRECTORY_NOT_FOUND,
|
|
6455
|
+
ERR_CODEC_OUT_OF_MEMORY: ERR_CODEC_OUT_OF_MEMORY,
|
|
6395
6456
|
ERR_ENCRYPTED: ERR_ENCRYPTED,
|
|
6396
6457
|
ERR_ENCRYPTED_CENTRAL_DIRECTORY: ERR_ENCRYPTED_CENTRAL_DIRECTORY,
|
|
6397
6458
|
ERR_ENTRY_DATA_OUT_OF_BOUNDS: ERR_ENTRY_DATA_OUT_OF_BOUNDS,
|
|
@@ -7839,6 +7900,7 @@ async function createFileEntry(reader, writer, { diskNumberStart, lockFileEntry
|
|
|
7839
7900
|
const result = await runWorker({ readable, writable }, workerOptions);
|
|
7840
7901
|
compressedSize = result.outputSize;
|
|
7841
7902
|
writer.size += compressedSize;
|
|
7903
|
+
throwIfAborted(signal);
|
|
7842
7904
|
if (!passThroughCompression) {
|
|
7843
7905
|
uncompressedSize = result.inputSize;
|
|
7844
7906
|
if (!encrypted || zipCrypto) {
|
|
@@ -9018,7 +9080,7 @@ function formatSupported(StreamClass, format) {
|
|
|
9018
9080
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
9019
9081
|
*/
|
|
9020
9082
|
|
|
9021
|
-
const VERSION = "2.
|
|
9083
|
+
const VERSION = "2.18.0";
|
|
9022
9084
|
|
|
9023
9085
|
/*
|
|
9024
9086
|
Copyright (c) 2025 Gildas Lormeau. All rights reserved.
|
|
@@ -9501,6 +9563,10 @@ const FORMAT_DEFLATE = "deflate";
|
|
|
9501
9563
|
const FORMAT_DEFLATE_RAW = "deflate-raw";
|
|
9502
9564
|
const FORMAT_DEFLATE64_RAW = "deflate64-raw";
|
|
9503
9565
|
const FORMAT_GZIP = "gzip";
|
|
9566
|
+
const Z_MEM_ERROR = -4;
|
|
9567
|
+
const Z_MEM_ERROR_CODE = "Z_MEM_ERROR";
|
|
9568
|
+
const COMPRESSION_FORMATS = [FORMAT_DEFLATE, FORMAT_DEFLATE_RAW, FORMAT_GZIP];
|
|
9569
|
+
const DECOMPRESSION_FORMATS = [FORMAT_DEFLATE, FORMAT_DEFLATE_RAW, FORMAT_GZIP, FORMAT_DEFLATE64_RAW];
|
|
9504
9570
|
|
|
9505
9571
|
let wasm$1, malloc, free, memory, initError;
|
|
9506
9572
|
|
|
@@ -9521,7 +9587,17 @@ function resetWasmExports$1() {
|
|
|
9521
9587
|
wasm$1 = malloc = free = memory = initError = null;
|
|
9522
9588
|
}
|
|
9523
9589
|
|
|
9590
|
+
function setZlibCode(error, result) {
|
|
9591
|
+
if (result === Z_MEM_ERROR) {
|
|
9592
|
+
error.code = Z_MEM_ERROR_CODE;
|
|
9593
|
+
}
|
|
9594
|
+
return error;
|
|
9595
|
+
}
|
|
9596
|
+
|
|
9524
9597
|
function _make(isCompress, type, options = {}) {
|
|
9598
|
+
if (!(isCompress ? COMPRESSION_FORMATS : DECOMPRESSION_FORMATS).includes(type)) {
|
|
9599
|
+
throw new TypeError("Unsupported format: " + type);
|
|
9600
|
+
}
|
|
9525
9601
|
if (!wasm$1) {
|
|
9526
9602
|
const error = new Error("WASM module not loaded");
|
|
9527
9603
|
error.cause = initError;
|
|
@@ -9530,7 +9606,7 @@ function _make(isCompress, type, options = {}) {
|
|
|
9530
9606
|
const level = (typeof options.level === "number") ? options.level : -1;
|
|
9531
9607
|
const outBufferSize = (typeof options.outBuffer === "number") ? options.outBuffer : 64 * 1024;
|
|
9532
9608
|
const inBufferSize = (typeof options.inBufferSize === "number") ? options.inBufferSize : 64 * 1024;
|
|
9533
|
-
const state = { out: 0, in: 0, inBufferSize: 0, streamHandle: 0 };
|
|
9609
|
+
const state = { out: 0, in: 0, inBufferSize: 0, streamHandle: 0, streamEnded: false };
|
|
9534
9610
|
let readableController, writableController, resolveWrite, cancelReason;
|
|
9535
9611
|
let backpressure = true;
|
|
9536
9612
|
let cancelled = false;
|
|
@@ -9583,7 +9659,7 @@ function _make(isCompress, type, options = {}) {
|
|
|
9583
9659
|
}
|
|
9584
9660
|
const result = disposeStream(state);
|
|
9585
9661
|
if (result !== 0) {
|
|
9586
|
-
const error = new Error("end error:" + result);
|
|
9662
|
+
const error = setZlibCode(new Error("end error:" + result), result);
|
|
9587
9663
|
readableController.error(error);
|
|
9588
9664
|
throw error;
|
|
9589
9665
|
}
|
|
@@ -9603,7 +9679,7 @@ function _make(isCompress, type, options = {}) {
|
|
|
9603
9679
|
state.in = malloc(inBufferSize);
|
|
9604
9680
|
state.inBufferSize = inBufferSize;
|
|
9605
9681
|
if (!state.out || !state.in) {
|
|
9606
|
-
throw new Error("allocation failed");
|
|
9682
|
+
throw setZlibCode(new Error("allocation failed"), Z_MEM_ERROR);
|
|
9607
9683
|
}
|
|
9608
9684
|
if (isCompress) {
|
|
9609
9685
|
state._process = wasm$1.deflate_process;
|
|
@@ -9639,7 +9715,7 @@ function _make(isCompress, type, options = {}) {
|
|
|
9639
9715
|
}
|
|
9640
9716
|
}
|
|
9641
9717
|
if (result !== 0) {
|
|
9642
|
-
throw new Error("init failed:" + result);
|
|
9718
|
+
throw setZlibCode(new Error("init failed:" + result), result);
|
|
9643
9719
|
}
|
|
9644
9720
|
} catch (error) {
|
|
9645
9721
|
disposeStream(state);
|
|
@@ -9654,6 +9730,9 @@ function _make(isCompress, type, options = {}) {
|
|
|
9654
9730
|
const out = state.out;
|
|
9655
9731
|
let offset = 0;
|
|
9656
9732
|
while (offset < chunk.length) {
|
|
9733
|
+
if (state.streamEnded) {
|
|
9734
|
+
throw new Error("trailing data after the end of the stream");
|
|
9735
|
+
}
|
|
9657
9736
|
const toRead = Math.min(chunk.length - offset, 32 * 1024);
|
|
9658
9737
|
if (!state.in || state.inBufferSize < toRead) {
|
|
9659
9738
|
if (state.in && free) {
|
|
@@ -9663,7 +9742,7 @@ function _make(isCompress, type, options = {}) {
|
|
|
9663
9742
|
state.in = malloc(toRead);
|
|
9664
9743
|
state.inBufferSize = toRead;
|
|
9665
9744
|
if (!state.in) {
|
|
9666
|
-
throw new Error("allocation failed");
|
|
9745
|
+
throw setZlibCode(new Error("allocation failed"), Z_MEM_ERROR);
|
|
9667
9746
|
}
|
|
9668
9747
|
}
|
|
9669
9748
|
heap.set(chunk.subarray(offset, offset + toRead), state.in);
|
|
@@ -9672,14 +9751,16 @@ function _make(isCompress, type, options = {}) {
|
|
|
9672
9751
|
const code = (result >> 24) & 0xff;
|
|
9673
9752
|
const signedCode = (code & 0x80) ? code - 256 : code;
|
|
9674
9753
|
if (signedCode < 0) {
|
|
9675
|
-
throw new Error("process error:" + signedCode);
|
|
9754
|
+
throw setZlibCode(new Error("process error:" + signedCode), signedCode);
|
|
9676
9755
|
}
|
|
9677
9756
|
const prod = result & 0x00ffffff;
|
|
9678
9757
|
if (prod) {
|
|
9679
9758
|
enqueue(heap.slice(out, out + prod));
|
|
9680
9759
|
}
|
|
9681
9760
|
const consumed = last_consumed(state.streamHandle);
|
|
9682
|
-
if (
|
|
9761
|
+
if (code === 1) {
|
|
9762
|
+
state.streamEnded = true;
|
|
9763
|
+
} else if (consumed === 0 && prod === 0) {
|
|
9683
9764
|
break;
|
|
9684
9765
|
}
|
|
9685
9766
|
offset += consumed;
|
|
@@ -9695,7 +9776,7 @@ function _make(isCompress, type, options = {}) {
|
|
|
9695
9776
|
const code = (result >> 24) & 0xff;
|
|
9696
9777
|
const signedCode = (code & 0x80) ? code - 256 : code;
|
|
9697
9778
|
if (signedCode < 0) {
|
|
9698
|
-
throw new Error("process error:" + signedCode);
|
|
9779
|
+
throw setZlibCode(new Error("process error:" + signedCode), signedCode);
|
|
9699
9780
|
}
|
|
9700
9781
|
const produced = result & 0x00ffffff;
|
|
9701
9782
|
if (produced) {
|
|
@@ -9754,10 +9835,10 @@ class DecompressionStreamZlib {
|
|
|
9754
9835
|
CompressionStreamZlib.requiresModule = true;
|
|
9755
9836
|
DecompressionStreamZlib.requiresModule = true;
|
|
9756
9837
|
// Constructing these classes before the module is loaded throws, so capability probes cannot rely
|
|
9757
|
-
// on trying the constructor; the formats are declared instead,
|
|
9758
|
-
//
|
|
9759
|
-
CompressionStreamZlib.supportedFormats =
|
|
9760
|
-
DecompressionStreamZlib.supportedFormats =
|
|
9838
|
+
// on trying the constructor; the formats are declared instead, the lists _make() checks a format
|
|
9839
|
+
// against before anything else.
|
|
9840
|
+
CompressionStreamZlib.supportedFormats = COMPRESSION_FORMATS;
|
|
9841
|
+
DecompressionStreamZlib.supportedFormats = DECOMPRESSION_FORMATS;
|
|
9761
9842
|
|
|
9762
9843
|
/*
|
|
9763
9844
|
Copyright (c) 2026 Gildas Lormeau. All rights reserved.
|
|
@@ -10053,6 +10134,7 @@ const ERR_INVALID_REQUEST_PASSWORD = "Invalid requestPassword option (must be a
|
|
|
10053
10134
|
const ERR_ABORT_EXPORT = "zipjs-abort-export";
|
|
10054
10135
|
const ABORT_ERROR_NAME = "AbortError";
|
|
10055
10136
|
const EMPTY_RAW_PASSWORD = new Uint8Array(0);
|
|
10137
|
+
const FALSE_ACCEPT_ERRORS = new Set([ERR_INVALID_CRC32, ERR_INVALID_UNCOMPRESSED_SIZE, ERR_INVALID_COMPRESSED_DATA]);
|
|
10056
10138
|
|
|
10057
10139
|
class ZipEntry {
|
|
10058
10140
|
|
|
@@ -11040,7 +11122,12 @@ async function readEntryData(entry, options, passwordState) {
|
|
|
11040
11122
|
release();
|
|
11041
11123
|
}
|
|
11042
11124
|
}
|
|
11043
|
-
|
|
11125
|
+
if (!tried.size) {
|
|
11126
|
+
throw new Error(ERR_ENCRYPTED);
|
|
11127
|
+
}
|
|
11128
|
+
const passwordError = new Error(ERR_INVALID_PASSWORD);
|
|
11129
|
+
passwordError.cause = error;
|
|
11130
|
+
throw passwordError;
|
|
11044
11131
|
|
|
11045
11132
|
async function tryPasswordCandidate(candidate) {
|
|
11046
11133
|
tried.add(candidate.key);
|
|
@@ -11061,7 +11148,7 @@ async function readEntryData(entry, options, passwordState) {
|
|
|
11061
11148
|
rememberPassword(passwordState, candidate);
|
|
11062
11149
|
return { done: true, data };
|
|
11063
11150
|
} catch (readError) {
|
|
11064
|
-
if (isAbortError(readError, signal) ||
|
|
11151
|
+
if (isAbortError(readError, signal) || !isWrongPasswordError(readError, entry)) {
|
|
11065
11152
|
throw readError;
|
|
11066
11153
|
}
|
|
11067
11154
|
return { done: false, error: readError };
|
|
@@ -11073,6 +11160,10 @@ function isInvalidPasswordError(error) {
|
|
|
11073
11160
|
return isErrorObject(error) && error.message == ERR_INVALID_PASSWORD;
|
|
11074
11161
|
}
|
|
11075
11162
|
|
|
11163
|
+
function isWrongPasswordError(error, entry) {
|
|
11164
|
+
return isInvalidPasswordError(error) || (entry.zipCrypto && isErrorObject(error) && FALSE_ACCEPT_ERRORS.has(error.message));
|
|
11165
|
+
}
|
|
11166
|
+
|
|
11076
11167
|
function isAbortError(error, signal) {
|
|
11077
11168
|
return Boolean(signal && signal.aborted) || (isErrorObject(error) && error.name == ABORT_ERROR_NAME);
|
|
11078
11169
|
}
|
|
@@ -11493,4 +11584,4 @@ function getPathParent(parent, path, movedEntry) {
|
|
|
11493
11584
|
return parent;
|
|
11494
11585
|
}
|
|
11495
11586
|
|
|
11496
|
-
export { BlobReader, BlobWriter, Data64URIReader, Data64URIWriter, ERR_ABORTED, ERR_AMBIGUOUS_ARCHIVE, ERR_ANCESTOR_ENTRY, ERR_BAD_FORMAT, ERR_CENTRAL_DIRECTORY_NOT_FOUND, ERR_DUPLICATED_NAME, ERR_DUPLICATE_IMPORTED_ENTRY, ERR_ENCRYPTED, ERR_ENCRYPTED_CENTRAL_DIRECTORY, ERR_ENTRY_DATA_OUT_OF_BOUNDS, ERR_ENTRY_EXISTS, ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND, ERR_EOCDR_NOT_FOUND, ERR_EXTRAFIELD_ZIP64_NOT_FOUND, ERR_HTTP_RANGE, ERR_HTTP_RESOURCE_CHANGED, ERR_HTTP_STATUS, ERR_INVALID_AUTHENTICATION_CODE, ERR_INVALID_BASE_URI, ERR_INVALID_CODEC_DEFINITION, ERR_INVALID_CODEC_MODULE, ERR_INVALID_COMMENT, ERR_INVALID_COMMENT_TYPE, ERR_INVALID_COMPRESSED_DATA, ERR_INVALID_CRC32, ERR_INVALID_DATE, ERR_INVALID_DUPLICATES, ERR_INVALID_ENCRYPTION_STRENGTH, ERR_INVALID_ENTRY, ERR_INVALID_ENTRY_COMMENT, ERR_INVALID_ENTRY_COMMENT_TYPE, ERR_INVALID_ENTRY_NAME, ERR_INVALID_EXTRAFIELD, ERR_INVALID_EXTRAFIELD_DATA, ERR_INVALID_EXTRAFIELD_DATA_TYPE, ERR_INVALID_EXTRAFIELD_TYPE, ERR_INVALID_FILENAME_VALIDATION, ERR_INVALID_FUNCTION_OPTION, ERR_INVALID_GID, ERR_INVALID_LEVEL, ERR_INVALID_MAX_APPENDED_DATA_SIZE, ERR_INVALID_MAX_WORKERS, ERR_INVALID_MSDOS_ATTRIBUTES, ERR_INVALID_MSDOS_DATA, ERR_INVALID_PASSWORD, ERR_INVALID_PASSWORDS, ERR_INVALID_PASSWORD_TYPE, ERR_INVALID_PASS_THROUGH, ERR_INVALID_PASS_THROUGH_VALUE, ERR_INVALID_READER, ERR_INVALID_READER_OPTIONS, ERR_INVALID_REQUEST_PASSWORD, ERR_INVALID_SIGNAL, ERR_INVALID_SIGNATURE_DATA, ERR_INVALID_STRICTNESS, ERR_INVALID_UID, ERR_INVALID_UNCOMPRESSED_SIZE, ERR_INVALID_UNIX_EXTRA_FIELD_TYPE, ERR_INVALID_UNIX_ID_SIZE, ERR_INVALID_UNIX_MODE, ERR_INVALID_URI, ERR_INVALID_VERSION, ERR_ITERATOR_COMPLETED_TOO_SOON, ERR_LOCAL_FILE_HEADER_NOT_FOUND, ERR_OVERLAPPING_ENTRY, ERR_PARENT_NOT_DIRECTORY, ERR_READABLE_CONSUMED, ERR_RESERVED_COMPRESSION_METHOD, ERR_ROOT_DIRECTORY_NOT_MOVABLE, ERR_SPLIT_ZIP_FILE, ERR_TARGET_NOT_DIRECTORY, ERR_UNDEFINED_COMPRESSION_METHOD, ERR_UNDEFINED_CRC32, ERR_UNDEFINED_READER, ERR_UNDEFINED_UNCOMPRESSED_SIZE, ERR_UNDETERMINED_SIZE, ERR_UNSAFE_FILENAME, ERR_UNSUPPORTED_COMPRESSION, ERR_UNSUPPORTED_CONTEXT, ERR_UNSUPPORTED_CRYPTO_API, ERR_UNSUPPORTED_ENCRYPTION, ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH, ERR_UNSUPPORTED_ENCRYPTION_USDZ, ERR_UNSUPPORTED_FORMAT, ERR_UNSUPPORTED_PASS_THROUGH_VALUE, ERR_UNSUPPORTED_SPLIT_USDZ, ERR_UNSUPPORTED_UINT64, ERR_WORKER_STARTUP_TIMEOUT, ERR_WRITER_NOT_INITIALIZED, ERR_WRITER_SIZE_NOT_WRITABLE, ERR_ZIP_CRYPTO_LAST_MOD_DATE, ERR_ZIP_NOT_EMPTY, HttpRangeReader, HttpReader, Reader, SplitDataReader, SplitDataWriter, TextReader, TextWriter, Uint8ArrayReader, Uint8ArrayWriter, VERSION, WARNING_APPENDED_DATA, WARNING_CLAMPED_LAST_MODIFICATION_DATE, WARNING_COMPRESSED_PATCHED_DATA, WARNING_COMPRESSION_UNAVAILABLE, WARNING_DUPLICATE_FILENAME, WARNING_MALFORMED_EXTRA_FIELD, WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG, WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD, WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES, WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME, WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY, WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY, WARNING_PREPENDED_CENTRAL_DIRECTORY, WARNING_PREPENDED_DATA, WARNING_TRAILING_CENTRAL_DIRECTORY_DATA, WARNING_UNKNOWN_VERSION, WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA, WARNING_UNSORTED_CENTRAL_DIRECTORY, WARNING_WRAPPED_ENTRIES_COUNT, Writer, ZipDirectoryEntry, ZipEntry, ZipFS, ZipFileEntry, ZipReader, ZipReaderStream, ZipWriter, ZipWriterStream, configure, createBlobTempStream, createOPFSTempStream, createSyncAccessHandleTempStream, fs, getMimeType, getRegisteredCodecs, getSupportedCompressionMethods, isZipFile, registerCodec, resetConfiguration, terminateWorkersAndModule as terminateWorkers, unregisterCodec };
|
|
11587
|
+
export { BlobReader, BlobWriter, Data64URIReader, Data64URIWriter, ERR_ABORTED, ERR_AMBIGUOUS_ARCHIVE, ERR_ANCESTOR_ENTRY, ERR_BAD_FORMAT, ERR_CENTRAL_DIRECTORY_NOT_FOUND, ERR_CODEC_OUT_OF_MEMORY, ERR_DUPLICATED_NAME, ERR_DUPLICATE_IMPORTED_ENTRY, ERR_ENCRYPTED, ERR_ENCRYPTED_CENTRAL_DIRECTORY, ERR_ENTRY_DATA_OUT_OF_BOUNDS, ERR_ENTRY_EXISTS, ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND, ERR_EOCDR_NOT_FOUND, ERR_EXTRAFIELD_ZIP64_NOT_FOUND, ERR_HTTP_RANGE, ERR_HTTP_RESOURCE_CHANGED, ERR_HTTP_STATUS, ERR_INVALID_AUTHENTICATION_CODE, ERR_INVALID_BASE_URI, ERR_INVALID_CODEC_DEFINITION, ERR_INVALID_CODEC_MODULE, ERR_INVALID_COMMENT, ERR_INVALID_COMMENT_TYPE, ERR_INVALID_COMPRESSED_DATA, ERR_INVALID_CRC32, ERR_INVALID_DATE, ERR_INVALID_DUPLICATES, ERR_INVALID_ENCRYPTION_STRENGTH, ERR_INVALID_ENTRY, ERR_INVALID_ENTRY_COMMENT, ERR_INVALID_ENTRY_COMMENT_TYPE, ERR_INVALID_ENTRY_NAME, ERR_INVALID_EXTRAFIELD, ERR_INVALID_EXTRAFIELD_DATA, ERR_INVALID_EXTRAFIELD_DATA_TYPE, ERR_INVALID_EXTRAFIELD_TYPE, ERR_INVALID_FILENAME_VALIDATION, ERR_INVALID_FUNCTION_OPTION, ERR_INVALID_GID, ERR_INVALID_LEVEL, ERR_INVALID_MAX_APPENDED_DATA_SIZE, ERR_INVALID_MAX_WORKERS, ERR_INVALID_MSDOS_ATTRIBUTES, ERR_INVALID_MSDOS_DATA, ERR_INVALID_PASSWORD, ERR_INVALID_PASSWORDS, ERR_INVALID_PASSWORD_TYPE, ERR_INVALID_PASS_THROUGH, ERR_INVALID_PASS_THROUGH_VALUE, ERR_INVALID_READER, ERR_INVALID_READER_OPTIONS, ERR_INVALID_REQUEST_PASSWORD, ERR_INVALID_SIGNAL, ERR_INVALID_SIGNATURE_DATA, ERR_INVALID_STRICTNESS, ERR_INVALID_UID, ERR_INVALID_UNCOMPRESSED_SIZE, ERR_INVALID_UNIX_EXTRA_FIELD_TYPE, ERR_INVALID_UNIX_ID_SIZE, ERR_INVALID_UNIX_MODE, ERR_INVALID_URI, ERR_INVALID_VERSION, ERR_ITERATOR_COMPLETED_TOO_SOON, ERR_LOCAL_FILE_HEADER_NOT_FOUND, ERR_OVERLAPPING_ENTRY, ERR_PARENT_NOT_DIRECTORY, ERR_READABLE_CONSUMED, ERR_RESERVED_COMPRESSION_METHOD, ERR_ROOT_DIRECTORY_NOT_MOVABLE, ERR_SPLIT_ZIP_FILE, ERR_TARGET_NOT_DIRECTORY, ERR_UNDEFINED_COMPRESSION_METHOD, ERR_UNDEFINED_CRC32, ERR_UNDEFINED_READER, ERR_UNDEFINED_UNCOMPRESSED_SIZE, ERR_UNDETERMINED_SIZE, ERR_UNSAFE_FILENAME, ERR_UNSUPPORTED_COMPRESSION, ERR_UNSUPPORTED_CONTEXT, ERR_UNSUPPORTED_CRYPTO_API, ERR_UNSUPPORTED_ENCRYPTION, ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH, ERR_UNSUPPORTED_ENCRYPTION_USDZ, ERR_UNSUPPORTED_FORMAT, ERR_UNSUPPORTED_PASS_THROUGH_VALUE, ERR_UNSUPPORTED_SPLIT_USDZ, ERR_UNSUPPORTED_UINT64, ERR_WORKER_STARTUP_TIMEOUT, ERR_WRITER_NOT_INITIALIZED, ERR_WRITER_SIZE_NOT_WRITABLE, ERR_ZIP_CRYPTO_LAST_MOD_DATE, ERR_ZIP_NOT_EMPTY, HttpRangeReader, HttpReader, Reader, SplitDataReader, SplitDataWriter, TextReader, TextWriter, Uint8ArrayReader, Uint8ArrayWriter, VERSION, WARNING_APPENDED_DATA, WARNING_CLAMPED_LAST_MODIFICATION_DATE, WARNING_COMPRESSED_PATCHED_DATA, WARNING_COMPRESSION_UNAVAILABLE, WARNING_DUPLICATE_FILENAME, WARNING_MALFORMED_EXTRA_FIELD, WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG, WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD, WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES, WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME, WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY, WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY, WARNING_PREPENDED_CENTRAL_DIRECTORY, WARNING_PREPENDED_DATA, WARNING_TRAILING_CENTRAL_DIRECTORY_DATA, WARNING_UNKNOWN_VERSION, WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA, WARNING_UNSORTED_CENTRAL_DIRECTORY, WARNING_WRAPPED_ENTRIES_COUNT, Writer, ZipDirectoryEntry, ZipEntry, ZipFS, ZipFileEntry, ZipReader, ZipReaderStream, ZipWriter, ZipWriterStream, configure, createBlobTempStream, createOPFSTempStream, createSyncAccessHandleTempStream, fs, getMimeType, getRegisteredCodecs, getSupportedCompressionMethods, isZipFile, registerCodec, resetConfiguration, terminateWorkersAndModule as terminateWorkers, unregisterCodec };
|