@cj-tech-master/excelts 4.2.0 → 4.2.1-canary.20260111102127.f808a37
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/THIRD_PARTY_NOTICES.md +0 -31
- package/dist/browser/index.browser.d.ts +1 -0
- package/dist/browser/index.browser.js +12 -0
- package/dist/{types/modules/archive → browser/modules/archive/compression}/compress.base.d.ts +1 -0
- package/dist/browser/modules/archive/{compress.base.js → compression/compress.base.js} +2 -1
- package/dist/{types/modules/archive → browser/modules/archive/compression}/compress.browser.d.ts +10 -8
- package/dist/{esm/modules/archive → browser/modules/archive/compression}/compress.browser.js +18 -19
- package/dist/browser/modules/archive/{compress.d.ts → compression/compress.d.ts} +2 -2
- package/dist/browser/modules/archive/{compress.js → compression/compress.js} +1 -1
- package/dist/browser/modules/archive/{crc32.browser.d.ts → compression/crc32.browser.d.ts} +1 -1
- package/dist/browser/modules/archive/{crc32.d.ts → compression/crc32.d.ts} +1 -1
- package/dist/browser/modules/archive/{crc32.js → compression/crc32.js} +1 -1
- package/dist/browser/modules/archive/{deflate-fallback.js → compression/deflate-fallback.js} +1 -1
- package/dist/browser/modules/archive/{streaming-compress.browser.d.ts → compression/streaming-compress.browser.d.ts} +2 -2
- package/dist/browser/modules/archive/{streaming-compress.browser.js → compression/streaming-compress.browser.js} +3 -3
- package/dist/browser/modules/archive/{streaming-compress.d.ts → compression/streaming-compress.d.ts} +2 -2
- package/dist/browser/modules/archive/{streaming-compress.js → compression/streaming-compress.js} +2 -2
- package/dist/browser/modules/archive/defaults.d.ts +1 -0
- package/dist/browser/modules/archive/defaults.js +6 -3
- package/dist/browser/modules/archive/index.base.d.ts +4 -4
- package/dist/browser/modules/archive/index.base.js +3 -6
- package/dist/browser/modules/archive/index.browser.d.ts +3 -4
- package/dist/browser/modules/archive/index.browser.js +3 -7
- package/dist/browser/modules/archive/index.d.ts +3 -4
- package/dist/browser/modules/archive/index.js +3 -5
- package/dist/browser/modules/archive/internal/byte-queue.d.ts +33 -0
- package/dist/browser/modules/archive/internal/byte-queue.js +407 -0
- package/dist/browser/modules/archive/io/archive-sink.d.ts +9 -0
- package/dist/browser/modules/archive/io/archive-sink.js +77 -0
- package/dist/browser/modules/archive/io/archive-source.d.ts +8 -0
- package/dist/browser/modules/archive/io/archive-source.js +107 -0
- package/dist/browser/modules/archive/{extract.d.ts → unzip/extract.d.ts} +2 -2
- package/dist/browser/modules/archive/unzip/index.d.ts +40 -0
- package/dist/browser/modules/archive/unzip/index.js +164 -0
- package/dist/browser/modules/archive/{parse.base.d.ts → unzip/stream.base.d.ts} +58 -3
- package/dist/browser/modules/archive/unzip/stream.base.js +1022 -0
- package/dist/browser/modules/archive/{parse.browser.d.ts → unzip/stream.browser.d.ts} +1 -1
- package/dist/browser/modules/archive/{parse.browser.js → unzip/stream.browser.js} +376 -110
- package/dist/browser/modules/archive/{parse.d.ts → unzip/stream.d.ts} +2 -2
- package/dist/{esm/modules/archive/parse.js → browser/modules/archive/unzip/stream.js} +7 -6
- package/dist/{types/modules/archive → browser/modules/archive/unzip}/zip-parser.d.ts +1 -1
- package/dist/{esm/modules/archive → browser/modules/archive/unzip}/zip-parser.js +38 -24
- package/dist/browser/modules/archive/utils/async-queue.d.ts +7 -0
- package/dist/browser/modules/archive/utils/async-queue.js +103 -0
- package/dist/browser/modules/archive/utils/bytes.js +16 -16
- package/dist/browser/modules/archive/utils/compressibility.d.ts +10 -0
- package/dist/browser/modules/archive/utils/compressibility.js +57 -0
- package/dist/browser/modules/archive/utils/parse-buffer.js +21 -23
- package/dist/browser/modules/archive/utils/pattern-scanner.d.ts +21 -0
- package/dist/browser/modules/archive/utils/pattern-scanner.js +27 -0
- package/dist/browser/modules/archive/utils/timestamps.js +62 -1
- package/dist/browser/modules/archive/utils/zip-extra-fields.d.ts +1 -1
- package/dist/browser/modules/archive/utils/zip-extra-fields.js +26 -14
- package/dist/browser/modules/archive/zip/index.d.ts +42 -0
- package/dist/browser/modules/archive/zip/index.js +157 -0
- package/dist/browser/modules/archive/{streaming-zip.d.ts → zip/stream.d.ts} +28 -5
- package/dist/browser/modules/archive/{streaming-zip.js → zip/stream.js} +192 -48
- package/dist/browser/modules/archive/zip/zip-bytes.d.ts +73 -0
- package/dist/browser/modules/archive/zip/zip-bytes.js +239 -0
- package/dist/{esm/modules/archive → browser/modules/archive/zip}/zip-entry-metadata.js +3 -3
- package/dist/browser/modules/archive/{zip-records.d.ts → zip-spec/zip-records.d.ts} +20 -0
- package/dist/browser/modules/archive/zip-spec/zip-records.js +126 -0
- package/dist/browser/modules/excel/form-control.d.ts +2 -0
- package/dist/browser/modules/excel/form-control.js +54 -16
- package/dist/browser/modules/excel/stream/workbook-reader.browser.js +1 -1
- package/dist/browser/modules/excel/stream/workbook-writer.browser.d.ts +1 -1
- package/dist/browser/modules/excel/stream/workbook-writer.browser.js +1 -1
- package/dist/browser/modules/excel/xlsx/xform/sheet/worksheet-xform.js +17 -3
- package/dist/browser/modules/excel/xlsx/xlsx.browser.js +3 -6
- package/dist/browser/modules/excel/xlsx/xlsx.js +1 -1
- package/dist/browser/modules/stream/streams.browser.d.ts +28 -28
- package/dist/browser/modules/stream/streams.browser.js +850 -697
- package/dist/browser/modules/stream/streams.js +140 -58
- package/dist/cjs/modules/archive/{compress.base.js → compression/compress.base.js} +2 -1
- package/dist/cjs/modules/archive/{compress.browser.js → compression/compress.browser.js} +18 -19
- package/dist/cjs/modules/archive/{compress.js → compression/compress.js} +1 -1
- package/dist/cjs/modules/archive/{crc32.js → compression/crc32.js} +1 -1
- package/dist/cjs/modules/archive/{deflate-fallback.js → compression/deflate-fallback.js} +1 -1
- package/dist/cjs/modules/archive/{streaming-compress.browser.js → compression/streaming-compress.browser.js} +3 -3
- package/dist/cjs/modules/archive/{streaming-compress.js → compression/streaming-compress.js} +2 -2
- package/dist/cjs/modules/archive/defaults.js +7 -4
- package/dist/cjs/modules/archive/index.base.js +9 -19
- package/dist/cjs/modules/archive/index.browser.js +4 -10
- package/dist/cjs/modules/archive/index.js +4 -8
- package/dist/cjs/modules/archive/internal/byte-queue.js +411 -0
- package/dist/cjs/modules/archive/io/archive-sink.js +82 -0
- package/dist/cjs/modules/archive/io/archive-source.js +114 -0
- package/dist/cjs/modules/archive/unzip/index.js +170 -0
- package/dist/cjs/modules/archive/unzip/stream.base.js +1044 -0
- package/dist/cjs/modules/archive/{parse.browser.js → unzip/stream.browser.js} +377 -111
- package/dist/cjs/modules/archive/{parse.js → unzip/stream.js} +9 -8
- package/dist/cjs/modules/archive/{zip-parser.js → unzip/zip-parser.js} +47 -33
- package/dist/cjs/modules/archive/utils/async-queue.js +106 -0
- package/dist/cjs/modules/archive/utils/bytes.js +16 -16
- package/dist/cjs/modules/archive/utils/compressibility.js +60 -0
- package/dist/cjs/modules/archive/utils/parse-buffer.js +21 -23
- package/dist/cjs/modules/archive/utils/pattern-scanner.js +31 -0
- package/dist/cjs/modules/archive/utils/timestamps.js +64 -3
- package/dist/cjs/modules/archive/utils/zip-extra-fields.js +26 -14
- package/dist/cjs/modules/archive/zip/index.js +162 -0
- package/dist/cjs/modules/archive/{streaming-zip.js → zip/stream.js} +194 -50
- package/dist/cjs/modules/archive/zip/zip-bytes.js +242 -0
- package/dist/cjs/modules/archive/{zip-entry-metadata.js → zip/zip-entry-metadata.js} +5 -5
- package/dist/cjs/modules/archive/zip-spec/zip-records.js +136 -0
- package/dist/cjs/modules/excel/form-control.js +54 -16
- package/dist/cjs/modules/excel/stream/workbook-reader.browser.js +2 -2
- package/dist/cjs/modules/excel/stream/workbook-writer.browser.js +4 -4
- package/dist/cjs/modules/excel/xlsx/xform/sheet/worksheet-xform.js +17 -3
- package/dist/cjs/modules/excel/xlsx/xlsx.browser.js +6 -9
- package/dist/cjs/modules/excel/xlsx/xlsx.js +2 -2
- package/dist/cjs/modules/stream/streams.browser.js +850 -697
- package/dist/cjs/modules/stream/streams.js +140 -58
- package/dist/esm/index.browser.js +12 -0
- package/dist/esm/modules/archive/{compress.base.js → compression/compress.base.js} +2 -1
- package/dist/{browser/modules/archive → esm/modules/archive/compression}/compress.browser.js +18 -19
- package/dist/esm/modules/archive/{compress.js → compression/compress.js} +1 -1
- package/dist/esm/modules/archive/{crc32.js → compression/crc32.js} +1 -1
- package/dist/esm/modules/archive/{deflate-fallback.js → compression/deflate-fallback.js} +1 -1
- package/dist/esm/modules/archive/{streaming-compress.browser.js → compression/streaming-compress.browser.js} +3 -3
- package/dist/esm/modules/archive/{streaming-compress.js → compression/streaming-compress.js} +2 -2
- package/dist/esm/modules/archive/defaults.js +6 -3
- package/dist/esm/modules/archive/index.base.js +3 -6
- package/dist/esm/modules/archive/index.browser.js +3 -7
- package/dist/esm/modules/archive/index.js +3 -5
- package/dist/esm/modules/archive/internal/byte-queue.js +407 -0
- package/dist/esm/modules/archive/io/archive-sink.js +77 -0
- package/dist/esm/modules/archive/io/archive-source.js +107 -0
- package/dist/esm/modules/archive/unzip/index.js +164 -0
- package/dist/esm/modules/archive/unzip/stream.base.js +1022 -0
- package/dist/esm/modules/archive/{parse.browser.js → unzip/stream.browser.js} +376 -110
- package/dist/{browser/modules/archive/parse.js → esm/modules/archive/unzip/stream.js} +7 -6
- package/dist/{browser/modules/archive → esm/modules/archive/unzip}/zip-parser.js +38 -24
- package/dist/esm/modules/archive/utils/async-queue.js +103 -0
- package/dist/esm/modules/archive/utils/bytes.js +16 -16
- package/dist/esm/modules/archive/utils/compressibility.js +57 -0
- package/dist/esm/modules/archive/utils/parse-buffer.js +21 -23
- package/dist/esm/modules/archive/utils/pattern-scanner.js +27 -0
- package/dist/esm/modules/archive/utils/timestamps.js +62 -1
- package/dist/esm/modules/archive/utils/zip-extra-fields.js +26 -14
- package/dist/esm/modules/archive/zip/index.js +157 -0
- package/dist/esm/modules/archive/{streaming-zip.js → zip/stream.js} +192 -48
- package/dist/esm/modules/archive/zip/zip-bytes.js +239 -0
- package/dist/{browser/modules/archive → esm/modules/archive/zip}/zip-entry-metadata.js +3 -3
- package/dist/esm/modules/archive/zip-spec/zip-records.js +126 -0
- package/dist/esm/modules/excel/form-control.js +54 -16
- package/dist/esm/modules/excel/stream/workbook-reader.browser.js +1 -1
- package/dist/esm/modules/excel/stream/workbook-writer.browser.js +1 -1
- package/dist/esm/modules/excel/xlsx/xform/sheet/worksheet-xform.js +17 -3
- package/dist/esm/modules/excel/xlsx/xlsx.browser.js +3 -6
- package/dist/esm/modules/excel/xlsx/xlsx.js +1 -1
- package/dist/esm/modules/stream/streams.browser.js +850 -697
- package/dist/esm/modules/stream/streams.js +140 -58
- package/dist/iife/THIRD_PARTY_NOTICES.md +81 -0
- package/dist/iife/excelts.iife.js +4777 -2863
- package/dist/iife/excelts.iife.js.map +1 -1
- package/dist/iife/excelts.iife.min.js +103 -31
- package/dist/types/index.browser.d.ts +1 -0
- package/dist/{browser/modules/archive → types/modules/archive/compression}/compress.base.d.ts +1 -0
- package/dist/{browser/modules/archive → types/modules/archive/compression}/compress.browser.d.ts +10 -8
- package/dist/types/modules/archive/{streaming-compress.browser.d.ts → compression/streaming-compress.browser.d.ts} +1 -1
- package/dist/types/modules/archive/defaults.d.ts +1 -0
- package/dist/types/modules/archive/index.base.d.ts +4 -4
- package/dist/types/modules/archive/index.browser.d.ts +3 -4
- package/dist/types/modules/archive/index.d.ts +3 -4
- package/dist/types/modules/archive/internal/byte-queue.d.ts +33 -0
- package/dist/types/modules/archive/io/archive-sink.d.ts +9 -0
- package/dist/types/modules/archive/io/archive-source.d.ts +8 -0
- package/dist/types/modules/archive/unzip/index.d.ts +40 -0
- package/dist/types/modules/archive/{parse.base.d.ts → unzip/stream.base.d.ts} +60 -5
- package/dist/types/modules/archive/{parse.browser.d.ts → unzip/stream.browser.d.ts} +2 -2
- package/dist/types/modules/archive/{parse.d.ts → unzip/stream.d.ts} +3 -3
- package/dist/{browser/modules/archive → types/modules/archive/unzip}/zip-parser.d.ts +1 -1
- package/dist/types/modules/archive/utils/async-queue.d.ts +7 -0
- package/dist/types/modules/archive/utils/compressibility.d.ts +10 -0
- package/dist/types/modules/archive/utils/pattern-scanner.d.ts +21 -0
- package/dist/types/modules/archive/utils/zip-extra-fields.d.ts +1 -1
- package/dist/types/modules/archive/zip/index.d.ts +42 -0
- package/dist/types/modules/archive/{streaming-zip.d.ts → zip/stream.d.ts} +29 -6
- package/dist/types/modules/archive/zip/zip-bytes.d.ts +73 -0
- package/dist/types/modules/archive/{zip-entry-metadata.d.ts → zip/zip-entry-metadata.d.ts} +1 -1
- package/dist/types/modules/archive/{zip-records.d.ts → zip-spec/zip-records.d.ts} +20 -0
- package/dist/types/modules/excel/form-control.d.ts +2 -0
- package/dist/types/modules/excel/stream/workbook-writer.browser.d.ts +1 -1
- package/dist/types/modules/stream/streams.browser.d.ts +28 -28
- package/package.json +10 -6
- package/dist/browser/modules/archive/byte-queue.d.ts +0 -18
- package/dist/browser/modules/archive/byte-queue.js +0 -125
- package/dist/browser/modules/archive/parse.base.js +0 -610
- package/dist/browser/modules/archive/utils/zip-extra.d.ts +0 -18
- package/dist/browser/modules/archive/utils/zip-extra.js +0 -68
- package/dist/browser/modules/archive/zip-builder.d.ts +0 -117
- package/dist/browser/modules/archive/zip-builder.js +0 -292
- package/dist/browser/modules/archive/zip-constants.d.ts +0 -18
- package/dist/browser/modules/archive/zip-constants.js +0 -23
- package/dist/browser/modules/archive/zip-records.js +0 -84
- package/dist/cjs/modules/archive/byte-queue.js +0 -129
- package/dist/cjs/modules/archive/parse.base.js +0 -632
- package/dist/cjs/modules/archive/utils/zip-extra.js +0 -74
- package/dist/cjs/modules/archive/zip-builder.js +0 -297
- package/dist/cjs/modules/archive/zip-constants.js +0 -26
- package/dist/cjs/modules/archive/zip-records.js +0 -90
- package/dist/esm/modules/archive/byte-queue.js +0 -125
- package/dist/esm/modules/archive/parse.base.js +0 -610
- package/dist/esm/modules/archive/utils/zip-extra.js +0 -68
- package/dist/esm/modules/archive/zip-builder.js +0 -292
- package/dist/esm/modules/archive/zip-constants.js +0 -23
- package/dist/esm/modules/archive/zip-records.js +0 -84
- package/dist/types/modules/archive/byte-queue.d.ts +0 -18
- package/dist/types/modules/archive/utils/zip-extra.d.ts +0 -18
- package/dist/types/modules/archive/zip-builder.d.ts +0 -117
- package/dist/types/modules/archive/zip-constants.d.ts +0 -18
- /package/dist/browser/modules/archive/{crc32.base.d.ts → compression/crc32.base.d.ts} +0 -0
- /package/dist/browser/modules/archive/{crc32.base.js → compression/crc32.base.js} +0 -0
- /package/dist/browser/modules/archive/{crc32.browser.js → compression/crc32.browser.js} +0 -0
- /package/dist/browser/modules/archive/{deflate-fallback.d.ts → compression/deflate-fallback.d.ts} +0 -0
- /package/dist/browser/modules/archive/{streaming-compress.base.d.ts → compression/streaming-compress.base.d.ts} +0 -0
- /package/dist/browser/modules/archive/{streaming-compress.base.js → compression/streaming-compress.base.js} +0 -0
- /package/dist/browser/modules/archive/{extract.js → unzip/extract.js} +0 -0
- /package/dist/browser/modules/archive/{zip-entry-metadata.d.ts → zip/zip-entry-metadata.d.ts} +0 -0
- /package/dist/browser/modules/archive/{zip-entry-info.d.ts → zip-spec/zip-entry-info.d.ts} +0 -0
- /package/dist/browser/modules/archive/{zip-entry-info.js → zip-spec/zip-entry-info.js} +0 -0
- /package/dist/cjs/modules/archive/{crc32.base.js → compression/crc32.base.js} +0 -0
- /package/dist/cjs/modules/archive/{crc32.browser.js → compression/crc32.browser.js} +0 -0
- /package/dist/cjs/modules/archive/{streaming-compress.base.js → compression/streaming-compress.base.js} +0 -0
- /package/dist/cjs/modules/archive/{extract.js → unzip/extract.js} +0 -0
- /package/dist/cjs/modules/archive/{zip-entry-info.js → zip-spec/zip-entry-info.js} +0 -0
- /package/dist/esm/modules/archive/{crc32.base.js → compression/crc32.base.js} +0 -0
- /package/dist/esm/modules/archive/{crc32.browser.js → compression/crc32.browser.js} +0 -0
- /package/dist/esm/modules/archive/{streaming-compress.base.js → compression/streaming-compress.base.js} +0 -0
- /package/dist/esm/modules/archive/{extract.js → unzip/extract.js} +0 -0
- /package/dist/esm/modules/archive/{zip-entry-info.js → zip-spec/zip-entry-info.js} +0 -0
- /package/dist/{LICENSE → iife/LICENSE} +0 -0
- /package/dist/types/modules/archive/{compress.d.ts → compression/compress.d.ts} +0 -0
- /package/dist/types/modules/archive/{crc32.base.d.ts → compression/crc32.base.d.ts} +0 -0
- /package/dist/types/modules/archive/{crc32.browser.d.ts → compression/crc32.browser.d.ts} +0 -0
- /package/dist/types/modules/archive/{crc32.d.ts → compression/crc32.d.ts} +0 -0
- /package/dist/types/modules/archive/{deflate-fallback.d.ts → compression/deflate-fallback.d.ts} +0 -0
- /package/dist/types/modules/archive/{streaming-compress.base.d.ts → compression/streaming-compress.base.d.ts} +0 -0
- /package/dist/types/modules/archive/{streaming-compress.d.ts → compression/streaming-compress.d.ts} +0 -0
- /package/dist/types/modules/archive/{extract.d.ts → unzip/extract.d.ts} +0 -0
- /package/dist/types/modules/archive/{zip-entry-info.d.ts → zip-spec/zip-entry-info.d.ts} +0 -0
|
@@ -16,20 +16,34 @@ export class Writable extends NodeWritable {
|
|
|
16
16
|
constructor(options) {
|
|
17
17
|
// If wrapping an existing stream, proxy to it
|
|
18
18
|
if (options?.stream) {
|
|
19
|
+
const underlying = options.stream;
|
|
19
20
|
// Create a pass-through wrapper that proxies to the underlying stream
|
|
20
21
|
super({
|
|
21
22
|
highWaterMark: options?.highWaterMark,
|
|
22
23
|
objectMode: options?.objectMode,
|
|
23
24
|
write(chunk, encoding, callback) {
|
|
24
|
-
|
|
25
|
+
underlying.write(chunk, encoding, callback);
|
|
25
26
|
},
|
|
26
27
|
final(callback) {
|
|
27
|
-
|
|
28
|
+
underlying.end(callback);
|
|
28
29
|
}
|
|
29
30
|
});
|
|
30
|
-
// Proxy events from underlying stream
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
// Proxy events from underlying stream, but ensure we clean up listeners so
|
|
32
|
+
// the underlying stream cannot retain this wrapper longer than necessary.
|
|
33
|
+
const onUnderlyingError = (err) => {
|
|
34
|
+
this.emit("error", err);
|
|
35
|
+
};
|
|
36
|
+
const onUnderlyingClose = () => {
|
|
37
|
+
this.emit("close");
|
|
38
|
+
};
|
|
39
|
+
const cleanup = () => {
|
|
40
|
+
underlying.off("error", onUnderlyingError);
|
|
41
|
+
underlying.off("close", onUnderlyingClose);
|
|
42
|
+
};
|
|
43
|
+
underlying.on("error", onUnderlyingError);
|
|
44
|
+
underlying.on("close", onUnderlyingClose);
|
|
45
|
+
this.once("close", cleanup);
|
|
46
|
+
this.once("finish", cleanup);
|
|
33
47
|
}
|
|
34
48
|
else {
|
|
35
49
|
super({
|
|
@@ -57,17 +71,16 @@ export function normalizeWritable(stream) {
|
|
|
57
71
|
if (stream instanceof Writable) {
|
|
58
72
|
return stream;
|
|
59
73
|
}
|
|
60
|
-
// Node.js Writable:
|
|
74
|
+
// Node.js Writable: already compatible, avoid extra wrapper allocation.
|
|
61
75
|
if (stream instanceof NodeWritable) {
|
|
62
|
-
return
|
|
76
|
+
return stream;
|
|
63
77
|
}
|
|
64
78
|
// Web WritableStream: detect by getWriter() (avoid relying on global WritableStream).
|
|
65
79
|
if (stream?.getWriter) {
|
|
66
|
-
|
|
67
|
-
return new Writable({ stream: nodeWritable });
|
|
80
|
+
return NodeWritable.fromWeb(stream);
|
|
68
81
|
}
|
|
69
|
-
// Assume it structurally matches Node's Writable
|
|
70
|
-
return
|
|
82
|
+
// Assume it structurally matches Node's Writable.
|
|
83
|
+
return stream;
|
|
71
84
|
}
|
|
72
85
|
// Import for internal use
|
|
73
86
|
import { textDecoder } from "./shared.js";
|
|
@@ -180,12 +193,13 @@ export function finished(stream, optionsOrCallback, callback) {
|
|
|
180
193
|
const promise = new Promise((resolve, reject) => {
|
|
181
194
|
const normalizedStream = toNodePipelineStream(stream);
|
|
182
195
|
nodeFinished(normalizedStream, options, (err) => {
|
|
183
|
-
|
|
196
|
+
// Node.js semantics: options.error defaults to true (report errors).
|
|
197
|
+
// If options.error === false, ignore errors and resolve.
|
|
198
|
+
if (err && options?.error !== false) {
|
|
184
199
|
reject(err);
|
|
200
|
+
return;
|
|
185
201
|
}
|
|
186
|
-
|
|
187
|
-
resolve();
|
|
188
|
-
}
|
|
202
|
+
resolve();
|
|
189
203
|
});
|
|
190
204
|
});
|
|
191
205
|
if (cb) {
|
|
@@ -533,13 +547,28 @@ export function addAbortSignal(signal, stream) {
|
|
|
533
547
|
stream.destroy(new Error("Aborted"));
|
|
534
548
|
return stream;
|
|
535
549
|
}
|
|
550
|
+
const cleanup = () => {
|
|
551
|
+
signal.removeEventListener("abort", onAbort);
|
|
552
|
+
stream.off?.("close", onDone);
|
|
553
|
+
stream.off?.("end", onDone);
|
|
554
|
+
stream.off?.("finish", onDone);
|
|
555
|
+
stream.off?.("error", onError);
|
|
556
|
+
};
|
|
536
557
|
const onAbort = () => {
|
|
558
|
+
cleanup();
|
|
537
559
|
stream.destroy(new Error("Aborted"));
|
|
538
560
|
};
|
|
561
|
+
const onDone = () => {
|
|
562
|
+
cleanup();
|
|
563
|
+
};
|
|
564
|
+
const onError = () => {
|
|
565
|
+
cleanup();
|
|
566
|
+
};
|
|
539
567
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
540
|
-
stream.
|
|
541
|
-
|
|
542
|
-
|
|
568
|
+
stream.once?.("close", onDone);
|
|
569
|
+
stream.once?.("end", onDone);
|
|
570
|
+
stream.once?.("finish", onDone);
|
|
571
|
+
stream.once?.("error", onError);
|
|
543
572
|
return stream;
|
|
544
573
|
}
|
|
545
574
|
/**
|
|
@@ -582,56 +611,109 @@ export function compose(...transforms) {
|
|
|
582
611
|
if (len === 1 && isNativeTransform(transforms[0])) {
|
|
583
612
|
return transforms[0];
|
|
584
613
|
}
|
|
585
|
-
// Chain all transforms together
|
|
614
|
+
// Chain all transforms together once.
|
|
586
615
|
for (let i = 0; i < len - 1; i++) {
|
|
587
616
|
transforms[i].pipe(transforms[i + 1]);
|
|
588
617
|
}
|
|
589
|
-
// Create a Duplex that writes to first and reads from last
|
|
590
618
|
const first = transforms[0];
|
|
591
619
|
const last = transforms[len - 1];
|
|
592
|
-
//
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
return first.write(chunk, encodingOrCallback);
|
|
601
|
-
}
|
|
602
|
-
return first.write(chunk, encodingOrCallback, callback);
|
|
603
|
-
};
|
|
604
|
-
// Override end to end first transform
|
|
605
|
-
composed.end = function (chunkOrCallback, encodingOrCallback, callback) {
|
|
606
|
-
if (typeof chunkOrCallback === "function") {
|
|
607
|
-
first.end(chunkOrCallback);
|
|
620
|
+
// Use a private output stream so we don't have to monkey-patch `write()` on the
|
|
621
|
+
// public composed stream (which would break piping into it).
|
|
622
|
+
const output = new PassThrough({ objectMode: last.readableObjectMode ?? true });
|
|
623
|
+
last.pipe(output);
|
|
624
|
+
let outputEnded = false;
|
|
625
|
+
const pumpOutput = (target) => {
|
|
626
|
+
if (outputEnded) {
|
|
627
|
+
return;
|
|
608
628
|
}
|
|
609
|
-
|
|
610
|
-
|
|
629
|
+
while (true) {
|
|
630
|
+
const chunk = output.read();
|
|
631
|
+
if (chunk === null) {
|
|
632
|
+
break;
|
|
633
|
+
}
|
|
634
|
+
if (!target.push(chunk)) {
|
|
635
|
+
break;
|
|
636
|
+
}
|
|
611
637
|
}
|
|
612
|
-
|
|
613
|
-
|
|
638
|
+
};
|
|
639
|
+
const composed = new Transform({
|
|
640
|
+
readableObjectMode: last.readableObjectMode,
|
|
641
|
+
writableObjectMode: first.writableObjectMode,
|
|
642
|
+
transform(chunk, encoding, callback) {
|
|
643
|
+
try {
|
|
644
|
+
// Forward writes into the head of the chain.
|
|
645
|
+
first.write(chunk, encoding, callback);
|
|
646
|
+
}
|
|
647
|
+
catch (err) {
|
|
648
|
+
callback(err);
|
|
649
|
+
}
|
|
650
|
+
},
|
|
651
|
+
flush(callback) {
|
|
652
|
+
// End the head of the chain; readable completion is driven by `output` ending.
|
|
653
|
+
const onFinish = () => {
|
|
654
|
+
cleanupFlush();
|
|
655
|
+
callback();
|
|
656
|
+
};
|
|
657
|
+
const onError = (err) => {
|
|
658
|
+
cleanupFlush();
|
|
659
|
+
callback(err);
|
|
660
|
+
};
|
|
661
|
+
const cleanupFlush = () => {
|
|
662
|
+
first.off?.("finish", onFinish);
|
|
663
|
+
first.off?.("error", onError);
|
|
664
|
+
};
|
|
665
|
+
first.once?.("finish", onFinish);
|
|
666
|
+
first.once?.("error", onError);
|
|
667
|
+
first.end();
|
|
668
|
+
},
|
|
669
|
+
read() {
|
|
670
|
+
pumpOutput(this);
|
|
671
|
+
},
|
|
672
|
+
destroy(err, callback) {
|
|
673
|
+
try {
|
|
674
|
+
output.destroy(err ?? undefined);
|
|
675
|
+
for (const t of transforms) {
|
|
676
|
+
t.destroy?.(err ?? undefined);
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
finally {
|
|
680
|
+
callback(err);
|
|
681
|
+
}
|
|
614
682
|
}
|
|
615
|
-
|
|
683
|
+
});
|
|
684
|
+
const onOutputReadable = () => {
|
|
685
|
+
pumpOutput(composed);
|
|
616
686
|
};
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
687
|
+
const onOutputEnd = () => {
|
|
688
|
+
cleanupListeners();
|
|
689
|
+
outputEnded = true;
|
|
690
|
+
composed.push(null);
|
|
620
691
|
};
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
692
|
+
const onAnyError = (err) => {
|
|
693
|
+
cleanupListeners();
|
|
694
|
+
composed.destroy(err);
|
|
695
|
+
};
|
|
696
|
+
const transformErrorListeners = [];
|
|
697
|
+
const cleanupListeners = () => {
|
|
698
|
+
output.off("readable", onOutputReadable);
|
|
699
|
+
output.off("end", onOutputEnd);
|
|
700
|
+
output.off("error", onAnyError);
|
|
701
|
+
for (const { t, fn } of transformErrorListeners) {
|
|
702
|
+
t.off?.("error", fn);
|
|
703
|
+
}
|
|
704
|
+
transformErrorListeners.length = 0;
|
|
705
|
+
};
|
|
706
|
+
output.on("readable", onOutputReadable);
|
|
707
|
+
output.once("end", onOutputEnd);
|
|
708
|
+
output.once("error", onAnyError);
|
|
709
|
+
for (const t of transforms) {
|
|
710
|
+
const tt = t;
|
|
711
|
+
tt.once?.("error", onAnyError);
|
|
712
|
+
transformErrorListeners.push({ t: tt, fn: onAnyError });
|
|
713
|
+
}
|
|
714
|
+
composed.once("close", () => {
|
|
715
|
+
cleanupListeners();
|
|
628
716
|
});
|
|
629
|
-
// Forward errors from any transform
|
|
630
|
-
for (const transform of transforms) {
|
|
631
|
-
transform.on("error", (err) => {
|
|
632
|
-
composed.emit("error", err);
|
|
633
|
-
});
|
|
634
|
-
}
|
|
635
717
|
return composed;
|
|
636
718
|
}
|
|
637
719
|
/**
|
|
@@ -712,7 +794,7 @@ export function once(emitter, event, options) {
|
|
|
712
794
|
onAbort();
|
|
713
795
|
return;
|
|
714
796
|
}
|
|
715
|
-
options.signal.addEventListener("abort", onAbort);
|
|
797
|
+
options.signal.addEventListener("abort", onAbort, { once: true });
|
|
716
798
|
}
|
|
717
799
|
});
|
|
718
800
|
}
|
|
@@ -21,11 +21,12 @@ exports.hasDeflateRawDecompressionStream = hasDeflateRawDecompressionStream;
|
|
|
21
21
|
exports.hasDeflateRawWebStreams = hasDeflateRawWebStreams;
|
|
22
22
|
exports.compressWithStream = compressWithStream;
|
|
23
23
|
exports.decompressWithStream = decompressWithStream;
|
|
24
|
-
const byte_queue_1 = require("
|
|
24
|
+
const byte_queue_1 = require("../internal/byte-queue.js");
|
|
25
25
|
/**
|
|
26
26
|
* Default threshold (in bytes) to choose the lower-overhead path.
|
|
27
27
|
*
|
|
28
28
|
* This is a performance knob, not a correctness requirement.
|
|
29
|
+
* Default: 8MB.
|
|
29
30
|
*/
|
|
30
31
|
exports.DEFAULT_COMPRESS_THRESHOLD_BYTES = 8 * 1024 * 1024;
|
|
31
32
|
/**
|
|
@@ -12,26 +12,21 @@
|
|
|
12
12
|
* - Edge >= 89
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.hasCompressionStream =
|
|
15
|
+
exports.hasCompressionStream = void 0;
|
|
16
16
|
exports.compress = compress;
|
|
17
17
|
exports.compressSync = compressSync;
|
|
18
18
|
exports.decompress = decompress;
|
|
19
19
|
exports.decompressSync = decompressSync;
|
|
20
20
|
const compress_base_1 = require("./compress.base.js");
|
|
21
|
+
Object.defineProperty(exports, "hasCompressionStream", { enumerable: true, get: function () { return compress_base_1.hasCompressionStream; } });
|
|
21
22
|
const deflate_fallback_1 = require("./deflate-fallback.js");
|
|
22
|
-
const defaults_1 = require("
|
|
23
|
-
/**
|
|
24
|
-
* Check if CompressionStream is available in this environment.
|
|
25
|
-
*
|
|
26
|
-
* Note: Some environments may expose CompressionStream but not support
|
|
27
|
-
* the "deflate-raw" format that ZIP requires.
|
|
28
|
-
*/
|
|
29
|
-
function hasCompressionStream() {
|
|
30
|
-
return typeof CompressionStream !== "undefined";
|
|
31
|
-
}
|
|
23
|
+
const defaults_1 = require("../defaults.js");
|
|
32
24
|
/**
|
|
33
25
|
* Compress data using browser's native CompressionStream or JS fallback
|
|
34
26
|
*
|
|
27
|
+
* Note: We always prefer native CompressionStream when available because
|
|
28
|
+
* it's significantly faster than pure JS implementation.
|
|
29
|
+
*
|
|
35
30
|
* @param data - Data to compress
|
|
36
31
|
* @param options - Compression options
|
|
37
32
|
* @returns Compressed data
|
|
@@ -44,16 +39,15 @@ function hasCompressionStream() {
|
|
|
44
39
|
*/
|
|
45
40
|
async function compress(data, options = {}) {
|
|
46
41
|
const level = options.level ?? defaults_1.DEFAULT_COMPRESS_LEVEL;
|
|
47
|
-
const thresholdBytes = (0, compress_base_1.resolveCompressThresholdBytes)(options);
|
|
48
42
|
// Level 0 means no compression
|
|
49
43
|
if (level === 0) {
|
|
50
44
|
return data;
|
|
51
45
|
}
|
|
52
|
-
//
|
|
53
|
-
if ((0, compress_base_1.hasDeflateRawCompressionStream)()
|
|
46
|
+
// Always use native CompressionStream when available - it's much faster than JS
|
|
47
|
+
if ((0, compress_base_1.hasDeflateRawCompressionStream)()) {
|
|
54
48
|
return (0, compress_base_1.compressWithStream)(data);
|
|
55
49
|
}
|
|
56
|
-
// Fallback to pure JS implementation
|
|
50
|
+
// Fallback to pure JS implementation only when native is unavailable
|
|
57
51
|
return (0, deflate_fallback_1.deflateRawCompressed)(data);
|
|
58
52
|
}
|
|
59
53
|
/**
|
|
@@ -75,16 +69,21 @@ function compressSync(data, options = {}) {
|
|
|
75
69
|
/**
|
|
76
70
|
* Decompress data using browser's native DecompressionStream or JS fallback
|
|
77
71
|
*
|
|
72
|
+
* Note: We always prefer native DecompressionStream when available because
|
|
73
|
+
* it's significantly faster than pure JS implementation, regardless of data size.
|
|
74
|
+
* The threshold is only useful for compression where the overhead matters more.
|
|
75
|
+
*
|
|
78
76
|
* @param data - Compressed data (deflate-raw format)
|
|
77
|
+
* @param options - Decompression options (kept for API parity; currently unused in browser)
|
|
79
78
|
* @returns Decompressed data
|
|
80
79
|
*/
|
|
81
80
|
async function decompress(data, options = {}) {
|
|
82
|
-
|
|
83
|
-
//
|
|
84
|
-
if ((0, compress_base_1.hasDeflateRawDecompressionStream)()
|
|
81
|
+
void options;
|
|
82
|
+
// Always use native DecompressionStream when available - it's much faster than JS
|
|
83
|
+
if ((0, compress_base_1.hasDeflateRawDecompressionStream)()) {
|
|
85
84
|
return (0, compress_base_1.decompressWithStream)(data);
|
|
86
85
|
}
|
|
87
|
-
// Fallback to pure JS implementation
|
|
86
|
+
// Fallback to pure JS implementation only when native is unavailable
|
|
88
87
|
return (0, deflate_fallback_1.inflateRaw)(data);
|
|
89
88
|
}
|
|
90
89
|
/**
|
|
@@ -46,7 +46,7 @@ exports.decompress = decompress;
|
|
|
46
46
|
exports.decompressSync = decompressSync;
|
|
47
47
|
const util_1 = require("util");
|
|
48
48
|
const zlib = __importStar(require("zlib"));
|
|
49
|
-
const defaults_1 = require("
|
|
49
|
+
const defaults_1 = require("../defaults.js");
|
|
50
50
|
// Re-export shared types and utilities
|
|
51
51
|
var compress_base_1 = require("./compress.base.js");
|
|
52
52
|
Object.defineProperty(exports, "hasCompressionStream", { enumerable: true, get: function () { return compress_base_1.hasCompressionStream; } });
|
|
@@ -47,7 +47,7 @@ exports.crc32Finalize = void 0;
|
|
|
47
47
|
exports.crc32 = crc32;
|
|
48
48
|
exports.ensureCrc32 = ensureCrc32;
|
|
49
49
|
exports.crc32Update = crc32Update;
|
|
50
|
-
const env_1 = require("
|
|
50
|
+
const env_1 = require("../../../utils/env.js");
|
|
51
51
|
const crc32_base_1 = require("./crc32.base.js");
|
|
52
52
|
Object.defineProperty(exports, "crc32Finalize", { enumerable: true, get: function () { return crc32_base_1.crc32Finalize; } });
|
|
53
53
|
// Lazy-loaded zlib module for Node.js
|
|
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.inflateRaw = inflateRaw;
|
|
16
16
|
exports.deflateRawStore = deflateRawStore;
|
|
17
17
|
exports.deflateRawCompressed = deflateRawCompressed;
|
|
18
|
-
const bytes_1 = require("
|
|
18
|
+
const bytes_1 = require("../utils/bytes.js");
|
|
19
19
|
// ============================================================================
|
|
20
20
|
// DEFLATE Decompression (Full implementation)
|
|
21
21
|
// ============================================================================
|
|
@@ -11,11 +11,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
11
11
|
exports.hasDeflateRaw = hasDeflateRaw;
|
|
12
12
|
exports.createDeflateStream = createDeflateStream;
|
|
13
13
|
exports.createInflateStream = createInflateStream;
|
|
14
|
-
const _stream_1 = require("
|
|
14
|
+
const _stream_1 = require("../../stream/index.js");
|
|
15
15
|
const deflate_fallback_1 = require("./deflate-fallback.js");
|
|
16
16
|
const compress_base_1 = require("./compress.base.js");
|
|
17
|
-
const bytes_1 = require("
|
|
18
|
-
const defaults_1 = require("
|
|
17
|
+
const bytes_1 = require("../utils/bytes.js");
|
|
18
|
+
const defaults_1 = require("../defaults.js");
|
|
19
19
|
const streaming_compress_base_1 = require("./streaming-compress.base.js");
|
|
20
20
|
/**
|
|
21
21
|
* Check if deflate-raw streaming compression is supported by this library.
|
package/dist/cjs/modules/archive/{streaming-compress.js → compression/streaming-compress.js}
RENAMED
|
@@ -10,8 +10,8 @@ exports.createDeflateStream = createDeflateStream;
|
|
|
10
10
|
exports.createInflateStream = createInflateStream;
|
|
11
11
|
exports.hasDeflateRaw = hasDeflateRaw;
|
|
12
12
|
const zlib_1 = require("zlib");
|
|
13
|
-
const _stream_1 = require("
|
|
14
|
-
const defaults_1 = require("
|
|
13
|
+
const _stream_1 = require("../../stream/index.js");
|
|
14
|
+
const defaults_1 = require("../defaults.js");
|
|
15
15
|
/**
|
|
16
16
|
* Wrapper around zlib DeflateRaw that flushes after every write
|
|
17
17
|
* This ensures true streaming behavior - data is emitted immediately, not buffered
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_ZIP_TIMESTAMPS = exports.DEFAULT_ZIP_LEVEL = exports.DEFAULT_COMPRESS_LEVEL = void 0;
|
|
4
|
-
exports.
|
|
5
|
-
|
|
6
|
-
exports.
|
|
3
|
+
exports.DEFAULT_ZIP_TIMESTAMPS = exports.DEFAULT_ZIP_LEVEL = exports.DEFAULT_COMPRESS_LEVEL = exports.DEFAULT_DEFLATE_LEVEL = void 0;
|
|
4
|
+
exports.DEFAULT_DEFLATE_LEVEL = 6;
|
|
5
|
+
// Backward-compatible aliases (avoid default drift across modules).
|
|
6
|
+
exports.DEFAULT_COMPRESS_LEVEL = exports.DEFAULT_DEFLATE_LEVEL;
|
|
7
|
+
exports.DEFAULT_ZIP_LEVEL = exports.DEFAULT_DEFLATE_LEVEL;
|
|
8
|
+
// Prefer reproducible output by default: omit the Info-ZIP UTC mtime extra field.
|
|
9
|
+
exports.DEFAULT_ZIP_TIMESTAMPS = "dos";
|
|
@@ -7,22 +7,12 @@
|
|
|
7
7
|
* from this file and then layer their platform-specific bindings.
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
11
|
-
//
|
|
12
|
-
var
|
|
13
|
-
Object.defineProperty(exports, "
|
|
14
|
-
Object.defineProperty(exports, "
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Object.defineProperty(exports, "
|
|
19
|
-
Object.defineProperty(exports, "ZipDeflateFile", { enumerable: true, get: function () { return streaming_zip_1.ZipDeflateFile; } });
|
|
20
|
-
Object.defineProperty(exports, "Zip", { enumerable: true, get: function () { return streaming_zip_1.Zip; } });
|
|
21
|
-
Object.defineProperty(exports, "ZipDeflate", { enumerable: true, get: function () { return streaming_zip_1.ZipDeflate; } });
|
|
22
|
-
// Buffer-based unzip API (cross-platform)
|
|
23
|
-
var extract_1 = require("./extract.js");
|
|
24
|
-
Object.defineProperty(exports, "extractAll", { enumerable: true, get: function () { return extract_1.extractAll; } });
|
|
25
|
-
Object.defineProperty(exports, "extractFile", { enumerable: true, get: function () { return extract_1.extractFile; } });
|
|
26
|
-
Object.defineProperty(exports, "listFiles", { enumerable: true, get: function () { return extract_1.listFiles; } });
|
|
27
|
-
Object.defineProperty(exports, "forEachEntry", { enumerable: true, get: function () { return extract_1.forEachEntry; } });
|
|
28
|
-
Object.defineProperty(exports, "ZipParser", { enumerable: true, get: function () { return extract_1.ZipParser; } });
|
|
10
|
+
exports.UnzipEntry = exports.ZipReader = exports.unzip = exports.ZipArchive = exports.zip = void 0;
|
|
11
|
+
// High-level APIs
|
|
12
|
+
var zip_1 = require("./zip/index.js");
|
|
13
|
+
Object.defineProperty(exports, "zip", { enumerable: true, get: function () { return zip_1.zip; } });
|
|
14
|
+
Object.defineProperty(exports, "ZipArchive", { enumerable: true, get: function () { return zip_1.ZipArchive; } });
|
|
15
|
+
var unzip_1 = require("./unzip/index.js");
|
|
16
|
+
Object.defineProperty(exports, "unzip", { enumerable: true, get: function () { return unzip_1.unzip; } });
|
|
17
|
+
Object.defineProperty(exports, "ZipReader", { enumerable: true, get: function () { return unzip_1.ZipReader; } });
|
|
18
|
+
Object.defineProperty(exports, "UnzipEntry", { enumerable: true, get: function () { return unzip_1.UnzipEntry; } });
|
|
@@ -20,28 +20,22 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
20
20
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.
|
|
23
|
+
exports.hasDeflateRaw = exports.createInflateStream = exports.createDeflateStream = exports.hasCompressionStream = exports.decompressSync = exports.decompress = exports.compressSync = exports.compress = exports.crc32Finalize = exports.crc32Update = exports.crc32 = void 0;
|
|
24
24
|
__exportStar(require("./index.base.js"), exports);
|
|
25
25
|
// CRC32
|
|
26
|
-
var crc32_browser_1 = require("./crc32.browser.js");
|
|
26
|
+
var crc32_browser_1 = require("./compression/crc32.browser.js");
|
|
27
27
|
Object.defineProperty(exports, "crc32", { enumerable: true, get: function () { return crc32_browser_1.crc32; } });
|
|
28
28
|
Object.defineProperty(exports, "crc32Update", { enumerable: true, get: function () { return crc32_browser_1.crc32Update; } });
|
|
29
29
|
Object.defineProperty(exports, "crc32Finalize", { enumerable: true, get: function () { return crc32_browser_1.crc32Finalize; } });
|
|
30
30
|
// Compression
|
|
31
|
-
var compress_browser_1 = require("./compress.browser.js");
|
|
31
|
+
var compress_browser_1 = require("./compression/compress.browser.js");
|
|
32
32
|
Object.defineProperty(exports, "compress", { enumerable: true, get: function () { return compress_browser_1.compress; } });
|
|
33
33
|
Object.defineProperty(exports, "compressSync", { enumerable: true, get: function () { return compress_browser_1.compressSync; } });
|
|
34
34
|
Object.defineProperty(exports, "decompress", { enumerable: true, get: function () { return compress_browser_1.decompress; } });
|
|
35
35
|
Object.defineProperty(exports, "decompressSync", { enumerable: true, get: function () { return compress_browser_1.decompressSync; } });
|
|
36
36
|
Object.defineProperty(exports, "hasCompressionStream", { enumerable: true, get: function () { return compress_browser_1.hasCompressionStream; } });
|
|
37
37
|
// Streaming compression
|
|
38
|
-
var streaming_compress_browser_1 = require("./streaming-compress.browser.js");
|
|
38
|
+
var streaming_compress_browser_1 = require("./compression/streaming-compress.browser.js");
|
|
39
39
|
Object.defineProperty(exports, "createDeflateStream", { enumerable: true, get: function () { return streaming_compress_browser_1.createDeflateStream; } });
|
|
40
40
|
Object.defineProperty(exports, "createInflateStream", { enumerable: true, get: function () { return streaming_compress_browser_1.createInflateStream; } });
|
|
41
41
|
Object.defineProperty(exports, "hasDeflateRaw", { enumerable: true, get: function () { return streaming_compress_browser_1.hasDeflateRaw; } });
|
|
42
|
-
// Stream-based unzip API (browser implementation)
|
|
43
|
-
var parse_browser_1 = require("./parse.browser.js");
|
|
44
|
-
Object.defineProperty(exports, "Parse", { enumerable: true, get: function () { return parse_browser_1.Parse; } });
|
|
45
|
-
Object.defineProperty(exports, "createParse", { enumerable: true, get: function () { return parse_browser_1.createParse; } });
|
|
46
|
-
// Buffer-based unzip API (cross-platform)
|
|
47
|
-
// (re-exported from ./index.base)
|
|
@@ -20,26 +20,22 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
20
20
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.
|
|
23
|
+
exports.hasDeflateRaw = exports.createInflateStream = exports.createDeflateStream = exports.hasCompressionStream = exports.decompressSync = exports.decompress = exports.compressSync = exports.compress = exports.crc32Finalize = exports.crc32Update = exports.crc32 = void 0;
|
|
24
24
|
__exportStar(require("./index.base.js"), exports);
|
|
25
25
|
// CRC32
|
|
26
|
-
var crc32_1 = require("./crc32.js");
|
|
26
|
+
var crc32_1 = require("./compression/crc32.js");
|
|
27
27
|
Object.defineProperty(exports, "crc32", { enumerable: true, get: function () { return crc32_1.crc32; } });
|
|
28
28
|
Object.defineProperty(exports, "crc32Update", { enumerable: true, get: function () { return crc32_1.crc32Update; } });
|
|
29
29
|
Object.defineProperty(exports, "crc32Finalize", { enumerable: true, get: function () { return crc32_1.crc32Finalize; } });
|
|
30
30
|
// Compression
|
|
31
|
-
var compress_1 = require("./compress.js");
|
|
31
|
+
var compress_1 = require("./compression/compress.js");
|
|
32
32
|
Object.defineProperty(exports, "compress", { enumerable: true, get: function () { return compress_1.compress; } });
|
|
33
33
|
Object.defineProperty(exports, "compressSync", { enumerable: true, get: function () { return compress_1.compressSync; } });
|
|
34
34
|
Object.defineProperty(exports, "decompress", { enumerable: true, get: function () { return compress_1.decompress; } });
|
|
35
35
|
Object.defineProperty(exports, "decompressSync", { enumerable: true, get: function () { return compress_1.decompressSync; } });
|
|
36
36
|
Object.defineProperty(exports, "hasCompressionStream", { enumerable: true, get: function () { return compress_1.hasCompressionStream; } });
|
|
37
37
|
// Streaming compression
|
|
38
|
-
var streaming_compress_1 = require("./streaming-compress.js");
|
|
38
|
+
var streaming_compress_1 = require("./compression/streaming-compress.js");
|
|
39
39
|
Object.defineProperty(exports, "createDeflateStream", { enumerable: true, get: function () { return streaming_compress_1.createDeflateStream; } });
|
|
40
40
|
Object.defineProperty(exports, "createInflateStream", { enumerable: true, get: function () { return streaming_compress_1.createInflateStream; } });
|
|
41
41
|
Object.defineProperty(exports, "hasDeflateRaw", { enumerable: true, get: function () { return streaming_compress_1.hasDeflateRaw; } });
|
|
42
|
-
// Stream-based unzip API (Node.js; browser build aliases to ./parse.browser.ts)
|
|
43
|
-
var parse_1 = require("./parse.js");
|
|
44
|
-
Object.defineProperty(exports, "Parse", { enumerable: true, get: function () { return parse_1.Parse; } });
|
|
45
|
-
Object.defineProperty(exports, "createParse", { enumerable: true, get: function () { return parse_1.createParse; } });
|