@cj-tech-master/excelts 4.2.0-canary.20260110111632.c88c61c → 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/{esm/modules/archive → browser/modules/archive/compression}/compress.base.js +1 -1
- package/dist/{types/modules/archive → browser/modules/archive/compression}/compress.browser.d.ts +2 -8
- package/dist/browser/modules/archive/{compress.browser.js → compression/compress.browser.js} +3 -11
- package/dist/browser/modules/archive/{compress.d.ts → compression/compress.d.ts} +2 -2
- package/dist/{esm/modules/archive → browser/modules/archive/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} +36 -2
- 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} +371 -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} +6 -5
- package/dist/browser/modules/archive/{zip-parser.d.ts → 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/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/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 -30
- package/dist/browser/modules/stream/streams.browser.js +830 -710
- package/dist/browser/modules/stream/streams.js +140 -58
- package/dist/cjs/modules/archive/{compress.base.js → compression/compress.base.js} +1 -1
- package/dist/cjs/modules/archive/{compress.browser.js → compression/compress.browser.js} +3 -11
- 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} +372 -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/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/xlsx.browser.js +6 -9
- package/dist/cjs/modules/excel/xlsx/xlsx.js +2 -2
- package/dist/cjs/modules/stream/streams.browser.js +830 -710
- package/dist/cjs/modules/stream/streams.js +140 -58
- package/dist/esm/index.browser.js +12 -0
- package/dist/{browser/modules/archive → esm/modules/archive/compression}/compress.base.js +1 -1
- package/dist/esm/modules/archive/{compress.browser.js → compression/compress.browser.js} +3 -11
- package/dist/{browser/modules/archive → esm/modules/archive/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} +371 -110
- package/dist/{browser/modules/archive/parse.js → esm/modules/archive/unzip/stream.js} +6 -5
- 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/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/xlsx.browser.js +3 -6
- package/dist/esm/modules/excel/xlsx/xlsx.js +1 -1
- package/dist/esm/modules/stream/streams.browser.js +830 -710
- package/dist/esm/modules/stream/streams.js +140 -58
- package/dist/iife/THIRD_PARTY_NOTICES.md +0 -31
- package/dist/iife/excelts.iife.js +6190 -4400
- 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.browser.d.ts +2 -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} +38 -4
- 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/types/modules/archive/{zip-parser.d.ts → 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/stream/workbook-writer.browser.d.ts +1 -1
- package/dist/types/modules/stream/streams.browser.d.ts +28 -30
- package/package.json +5 -1
- 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 -644
- 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 -666
- 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 -644
- 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/{compress.base.d.ts → compression/compress.base.d.ts} +0 -0
- /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/types/modules/archive/{compress.base.d.ts → compression/compress.base.d.ts} +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
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -62,37 +62,6 @@ SOFTWARE.
|
|
|
62
62
|
|
|
63
63
|
## Third-party component
|
|
64
64
|
|
|
65
|
-
unzipper is licensed under the MIT License:
|
|
66
|
-
|
|
67
|
-
The MIT License (MIT)
|
|
68
|
-
|
|
69
|
-
Copyright (c) 2012 - 2013 Near Infinity Corporation
|
|
70
|
-
|
|
71
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
72
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
73
|
-
in the Software without restriction, including without limitation the rights
|
|
74
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
75
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
76
|
-
furnished to do so, subject to the following conditions:
|
|
77
|
-
|
|
78
|
-
The above copyright notice and this permission notice shall be included in all
|
|
79
|
-
copies or substantial portions of the Software.
|
|
80
|
-
|
|
81
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
82
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
83
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
84
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
85
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
86
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
87
|
-
SOFTWARE.
|
|
88
|
-
|
|
89
|
-
Commits in this fork are (c) Ziggy Jonsson (ziggy.jonsson.nyc@gmail.com) and
|
|
90
|
-
fall under same licence structure as the original repo (MIT).
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
## Third-party component
|
|
95
|
-
|
|
96
65
|
saxes is licensed under the ISC License:
|
|
97
66
|
|
|
98
67
|
The ISC License
|
|
@@ -25,3 +25,4 @@ export { WorkbookWriter, WorkbookReader, WorksheetWriter, WorksheetReader };
|
|
|
25
25
|
export type { CsvReadOptions, CsvWriteOptions, CsvStreamReadOptions, CsvStreamWriteOptions } from "@csv/csv.browser";
|
|
26
26
|
export { CsvParserStream, CsvFormatterStream } from "@csv/csv.browser";
|
|
27
27
|
export * from "@excel/utils/sheet-utils";
|
|
28
|
+
export { zip, unzip, ZipArchive, ZipReader, UnzipEntry, type ZipOptions, type ZipEntryOptions, type UnzipOptions, type ArchiveSource, type ArchiveSink, crc32, crc32Update, crc32Finalize, compress, compressSync, decompress, decompressSync, hasCompressionStream, type CompressOptions, createDeflateStream, createInflateStream, hasDeflateRaw, type StreamCompressOptions } from "@archive/index.browser";
|
|
@@ -39,3 +39,15 @@ export { CsvParserStream, CsvFormatterStream } from "./modules/csv/csv.browser.j
|
|
|
39
39
|
// Utilities
|
|
40
40
|
// =============================================================================
|
|
41
41
|
export * from "./modules/excel/utils/sheet-utils.js";
|
|
42
|
+
// =============================================================================
|
|
43
|
+
// Archive (ZIP) support (Browser-compatible)
|
|
44
|
+
// =============================================================================
|
|
45
|
+
export {
|
|
46
|
+
// High-level archive API
|
|
47
|
+
zip, unzip, ZipArchive, ZipReader, UnzipEntry,
|
|
48
|
+
// CRC32
|
|
49
|
+
crc32, crc32Update, crc32Finalize,
|
|
50
|
+
// Compression utilities
|
|
51
|
+
compress, compressSync, decompress, decompressSync, hasCompressionStream,
|
|
52
|
+
// Streaming compression
|
|
53
|
+
createDeflateStream, createInflateStream, hasDeflateRaw } from "./modules/archive/index.browser.js";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Browser fallback: For browsers without deflate-raw support (Firefox < 113, Safari < 16.4),
|
|
9
9
|
* see deflate-fallback.ts for pure JS implementation
|
|
10
10
|
*/
|
|
11
|
-
import { ByteQueue } from "
|
|
11
|
+
import { ByteQueue } from "../internal/byte-queue.js";
|
|
12
12
|
/**
|
|
13
13
|
* Default threshold (in bytes) to choose the lower-overhead path.
|
|
14
14
|
*
|
package/dist/{types/modules/archive → browser/modules/archive/compression}/compress.browser.d.ts
RENAMED
|
@@ -10,15 +10,9 @@
|
|
|
10
10
|
* - Safari >= 14.1
|
|
11
11
|
* - Edge >= 89
|
|
12
12
|
*/
|
|
13
|
-
import { type CompressOptions } from "
|
|
13
|
+
import { type CompressOptions, hasCompressionStream } from "@archive/compression/compress.base";
|
|
14
14
|
export { type CompressOptions };
|
|
15
|
-
|
|
16
|
-
* Check if CompressionStream is available in this environment.
|
|
17
|
-
*
|
|
18
|
-
* Note: Some environments may expose CompressionStream but not support
|
|
19
|
-
* the "deflate-raw" format that ZIP requires.
|
|
20
|
-
*/
|
|
21
|
-
export declare function hasCompressionStream(): boolean;
|
|
15
|
+
export { hasCompressionStream };
|
|
22
16
|
/**
|
|
23
17
|
* Compress data using browser's native CompressionStream or JS fallback
|
|
24
18
|
*
|
package/dist/browser/modules/archive/{compress.browser.js → compression/compress.browser.js}
RENAMED
|
@@ -10,20 +10,12 @@
|
|
|
10
10
|
* - Safari >= 14.1
|
|
11
11
|
* - Edge >= 89
|
|
12
12
|
*/
|
|
13
|
-
import { compressWithStream, decompressWithStream, hasDeflateRawCompressionStream, hasDeflateRawDecompressionStream } from "./compress.base.js";
|
|
13
|
+
import { compressWithStream, decompressWithStream, hasCompressionStream, hasDeflateRawCompressionStream, hasDeflateRawDecompressionStream } from "./compress.base.js";
|
|
14
14
|
import { inflateRaw, deflateRawCompressed } from "./deflate-fallback.js";
|
|
15
|
-
import { DEFAULT_COMPRESS_LEVEL } from "
|
|
15
|
+
import { DEFAULT_COMPRESS_LEVEL } from "../defaults.js";
|
|
16
16
|
// Re-export shared types
|
|
17
17
|
export {};
|
|
18
|
-
|
|
19
|
-
* Check if CompressionStream is available in this environment.
|
|
20
|
-
*
|
|
21
|
-
* Note: Some environments may expose CompressionStream but not support
|
|
22
|
-
* the "deflate-raw" format that ZIP requires.
|
|
23
|
-
*/
|
|
24
|
-
export function hasCompressionStream() {
|
|
25
|
-
return typeof CompressionStream !== "undefined";
|
|
26
|
-
}
|
|
18
|
+
export { hasCompressionStream };
|
|
27
19
|
/**
|
|
28
20
|
* Compress data using browser's native CompressionStream or JS fallback
|
|
29
21
|
*
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Uses zlib module (C++ implementation, fastest) with "deflate-raw" format
|
|
5
5
|
* (raw DEFLATE without zlib header/trailer, required for ZIP files)
|
|
6
6
|
*/
|
|
7
|
-
export { type CompressOptions, hasCompressionStream } from "@archive/compress.base";
|
|
8
|
-
import type { CompressOptions } from "@archive/compress.base";
|
|
7
|
+
export { type CompressOptions, hasCompressionStream } from "@archive/compression/compress.base";
|
|
8
|
+
import type { CompressOptions } from "@archive/compression/compress.base";
|
|
9
9
|
/**
|
|
10
10
|
* Compress data using Node.js native zlib
|
|
11
11
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { promisify } from "util";
|
|
8
8
|
import * as zlib from "zlib";
|
|
9
|
-
import { DEFAULT_COMPRESS_LEVEL } from "
|
|
9
|
+
import { DEFAULT_COMPRESS_LEVEL } from "../defaults.js";
|
|
10
10
|
// Re-export shared types and utilities
|
|
11
11
|
export { hasCompressionStream } from "./compress.base.js";
|
|
12
12
|
function uint8ArrayToBufferView(data) {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* x^32 + x^26 + x^23 + x^22 + x^16 + x^12 + x^11 + x^10 + x^8 + x^7 + x^5 + x^4 + x^2 + x + 1
|
|
8
8
|
* Represented as 0xEDB88320 in reversed (LSB-first) form
|
|
9
9
|
*/
|
|
10
|
-
export { crc32JS as crc32, crc32UpdateJS as crc32Update, crc32Finalize } from "@archive/crc32.base";
|
|
10
|
+
export { crc32JS as crc32, crc32UpdateJS as crc32Update, crc32Finalize } from "@archive/compression/crc32.base";
|
|
11
11
|
/**
|
|
12
12
|
* Ensure CRC32 is ready (no-op in browser, for API compatibility)
|
|
13
13
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* x^32 + x^26 + x^23 + x^22 + x^16 + x^12 + x^11 + x^10 + x^8 + x^7 + x^5 + x^4 + x^2 + x + 1
|
|
9
9
|
* Represented as 0xEDB88320 in reversed (LSB-first) form
|
|
10
10
|
*/
|
|
11
|
-
import { crc32Finalize } from "@archive/crc32.base";
|
|
11
|
+
import { crc32Finalize } from "@archive/compression/crc32.base";
|
|
12
12
|
/**
|
|
13
13
|
* Calculate CRC32 checksum for the given data
|
|
14
14
|
* Uses native zlib.crc32 in Node.js for ~100x better performance
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* x^32 + x^26 + x^23 + x^22 + x^16 + x^12 + x^11 + x^10 + x^8 + x^7 + x^5 + x^4 + x^2 + x + 1
|
|
9
9
|
* Represented as 0xEDB88320 in reversed (LSB-first) form
|
|
10
10
|
*/
|
|
11
|
-
import { isNode } from "
|
|
11
|
+
import { isNode } from "../../../utils/env.js";
|
|
12
12
|
import { crc32JS, crc32UpdateJS, crc32Finalize } from "./crc32.base.js";
|
|
13
13
|
// Lazy-loaded zlib module for Node.js
|
|
14
14
|
let _zlib = null;
|
package/dist/browser/modules/archive/{deflate-fallback.js → compression/deflate-fallback.js}
RENAMED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* - Safari < 16.4
|
|
11
11
|
* - Chrome < 103
|
|
12
12
|
*/
|
|
13
|
-
import { concatUint8Arrays } from "
|
|
13
|
+
import { concatUint8Arrays } from "../utils/bytes.js";
|
|
14
14
|
// ============================================================================
|
|
15
15
|
// DEFLATE Decompression (Full implementation)
|
|
16
16
|
// ============================================================================
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* API compatible with Node.js version - supports .on("data"), .on("end"), .write(callback), .end()
|
|
8
8
|
*/
|
|
9
|
-
export type { StreamCompressOptions } from "@archive/streaming-compress.base";
|
|
10
|
-
import { type DeflateStream, type InflateStream, type StreamCompressOptions } from "@archive/streaming-compress.base";
|
|
9
|
+
export type { DeflateStream, InflateStream, StreamCompressOptions, StreamingCodec } from "@archive/compression/streaming-compress.base";
|
|
10
|
+
import { type DeflateStream, type InflateStream, type StreamCompressOptions } from "@archive/compression/streaming-compress.base";
|
|
11
11
|
/**
|
|
12
12
|
* Check if deflate-raw streaming compression is supported by this library.
|
|
13
13
|
*
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*
|
|
7
7
|
* API compatible with Node.js version - supports .on("data"), .on("end"), .write(callback), .end()
|
|
8
8
|
*/
|
|
9
|
-
import { EventEmitter } from "
|
|
9
|
+
import { EventEmitter } from "../../stream/index.browser.js";
|
|
10
10
|
import { deflateRawCompressed, inflateRaw } from "./deflate-fallback.js";
|
|
11
11
|
import { hasDeflateRawWebStreams } from "./compress.base.js";
|
|
12
|
-
import { concatUint8Arrays } from "
|
|
13
|
-
import { DEFAULT_COMPRESS_LEVEL } from "
|
|
12
|
+
import { concatUint8Arrays } from "../utils/bytes.js";
|
|
13
|
+
import { DEFAULT_COMPRESS_LEVEL } from "../defaults.js";
|
|
14
14
|
import { asError } from "./streaming-compress.base.js";
|
|
15
15
|
/**
|
|
16
16
|
* Check if deflate-raw streaming compression is supported by this library.
|
package/dist/browser/modules/archive/{streaming-compress.d.ts → compression/streaming-compress.d.ts}
RENAMED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Uses zlib.createDeflateRaw() with explicit flush() calls for real chunk-by-chunk streaming.
|
|
5
5
|
* Each write() immediately produces compressed output without waiting for end().
|
|
6
6
|
*/
|
|
7
|
-
export type { DeflateStream, InflateStream, StreamCompressOptions, StreamingCodec } from "@archive/streaming-compress.base";
|
|
8
|
-
import type { DeflateStream, InflateStream, StreamCompressOptions } from "@archive/streaming-compress.base";
|
|
7
|
+
export type { DeflateStream, InflateStream, StreamCompressOptions, StreamingCodec } from "@archive/compression/streaming-compress.base";
|
|
8
|
+
import type { DeflateStream, InflateStream, StreamCompressOptions } from "@archive/compression/streaming-compress.base";
|
|
9
9
|
/**
|
|
10
10
|
* Create a true streaming DEFLATE compressor
|
|
11
11
|
* Returns a Transform stream that emits compressed data immediately after each write
|
package/dist/browser/modules/archive/{streaming-compress.js → compression/streaming-compress.js}
RENAMED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Each write() immediately produces compressed output without waiting for end().
|
|
6
6
|
*/
|
|
7
7
|
import { createDeflateRaw, createInflateRaw, constants } from "zlib";
|
|
8
|
-
import { Transform } from "
|
|
9
|
-
import { DEFAULT_COMPRESS_LEVEL } from "
|
|
8
|
+
import { Transform } from "../../stream/index.browser.js";
|
|
9
|
+
import { DEFAULT_COMPRESS_LEVEL } from "../defaults.js";
|
|
10
10
|
/**
|
|
11
11
|
* Wrapper around zlib DeflateRaw that flushes after every write
|
|
12
12
|
* This ensures true streaming behavior - data is emitted immediately, not buffered
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ZipTimestampMode } from "@archive/utils/timestamps";
|
|
2
|
+
export declare const DEFAULT_DEFLATE_LEVEL = 6;
|
|
2
3
|
export declare const DEFAULT_COMPRESS_LEVEL = 6;
|
|
3
4
|
export declare const DEFAULT_ZIP_LEVEL = 6;
|
|
4
5
|
export declare const DEFAULT_ZIP_TIMESTAMPS: ZipTimestampMode;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
export const
|
|
2
|
-
|
|
3
|
-
export const
|
|
1
|
+
export const DEFAULT_DEFLATE_LEVEL = 6;
|
|
2
|
+
// Backward-compatible aliases (avoid default drift across modules).
|
|
3
|
+
export const DEFAULT_COMPRESS_LEVEL = DEFAULT_DEFLATE_LEVEL;
|
|
4
|
+
export const DEFAULT_ZIP_LEVEL = DEFAULT_DEFLATE_LEVEL;
|
|
5
|
+
// Prefer reproducible output by default: omit the Info-ZIP UTC mtime extra field.
|
|
6
|
+
export const DEFAULT_ZIP_TIMESTAMPS = "dos";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Platform-specific entrypoints (index.ts / index.browser.ts) should re-export
|
|
6
6
|
* from this file and then layer their platform-specific bindings.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export type
|
|
8
|
+
export type { ArchiveSource } from "@archive/io/archive-source";
|
|
9
|
+
export type { ArchiveSink } from "@archive/io/archive-sink";
|
|
10
|
+
export { zip, ZipArchive, type ZipOptions, type ZipEntryOptions } from "@archive/zip";
|
|
11
|
+
export { unzip, ZipReader, UnzipEntry, type UnzipOptions } from "@archive/unzip";
|
|
@@ -5,9 +5,6 @@
|
|
|
5
5
|
* Platform-specific entrypoints (index.ts / index.browser.ts) should re-export
|
|
6
6
|
* from this file and then layer their platform-specific bindings.
|
|
7
7
|
*/
|
|
8
|
-
//
|
|
9
|
-
export {
|
|
10
|
-
|
|
11
|
-
export { StreamingZip, ZipDeflateFile, Zip, ZipDeflate } from "./streaming-zip.js";
|
|
12
|
-
// Buffer-based unzip API (cross-platform)
|
|
13
|
-
export { extractAll, extractFile, listFiles, forEachEntry, ZipParser } from "./extract.js";
|
|
8
|
+
// High-level APIs
|
|
9
|
+
export { zip, ZipArchive } from "./zip/index.js";
|
|
10
|
+
export { unzip, ZipReader, UnzipEntry } from "./unzip/index.js";
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* browser-specific implementations so we can enforce export-surface parity.
|
|
6
6
|
*/
|
|
7
7
|
export * from "@archive/index.base";
|
|
8
|
-
export { crc32, crc32Update, crc32Finalize } from "@archive/crc32.browser";
|
|
9
|
-
export { compress, compressSync, decompress, decompressSync, hasCompressionStream, type CompressOptions } from "@archive/compress.browser";
|
|
10
|
-
export { createDeflateStream, createInflateStream, hasDeflateRaw, type StreamCompressOptions } from "@archive/streaming-compress.browser";
|
|
11
|
-
export { Parse, createParse, type ParseOptions, type ZipEntry as StreamZipEntry } from "@archive/parse.browser";
|
|
8
|
+
export { crc32, crc32Update, crc32Finalize } from "@archive/compression/crc32.browser";
|
|
9
|
+
export { compress, compressSync, decompress, decompressSync, hasCompressionStream, type CompressOptions } from "@archive/compression/compress.browser";
|
|
10
|
+
export { createDeflateStream, createInflateStream, hasDeflateRaw, type StreamCompressOptions } from "@archive/compression/streaming-compress.browser";
|
|
@@ -6,12 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export * from "./index.base.js";
|
|
8
8
|
// CRC32
|
|
9
|
-
export { crc32, crc32Update, crc32Finalize } from "./crc32.browser.js";
|
|
9
|
+
export { crc32, crc32Update, crc32Finalize } from "./compression/crc32.browser.js";
|
|
10
10
|
// Compression
|
|
11
|
-
export { compress, compressSync, decompress, decompressSync, hasCompressionStream } from "./compress.browser.js";
|
|
11
|
+
export { compress, compressSync, decompress, decompressSync, hasCompressionStream } from "./compression/compress.browser.js";
|
|
12
12
|
// Streaming compression
|
|
13
|
-
export { createDeflateStream, createInflateStream, hasDeflateRaw } from "./streaming-compress.browser.js";
|
|
14
|
-
// Stream-based unzip API (browser implementation)
|
|
15
|
-
export { Parse, createParse } from "./parse.browser.js";
|
|
16
|
-
// Buffer-based unzip API (cross-platform)
|
|
17
|
-
// (re-exported from ./index.base)
|
|
13
|
+
export { createDeflateStream, createInflateStream, hasDeflateRaw } from "./compression/streaming-compress.browser.js";
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* It groups all ZIP creation and extraction utilities in one place.
|
|
6
6
|
*/
|
|
7
7
|
export * from "@archive/index.base";
|
|
8
|
-
export { crc32, crc32Update, crc32Finalize } from "@archive/crc32";
|
|
9
|
-
export { compress, compressSync, decompress, decompressSync, hasCompressionStream, type CompressOptions } from "@archive/compress";
|
|
10
|
-
export { createDeflateStream, createInflateStream, hasDeflateRaw, type StreamCompressOptions } from "@archive/streaming-compress";
|
|
11
|
-
export { Parse, createParse, type ParseOptions, type ZipEntry as StreamZipEntry } from "@archive/parse";
|
|
8
|
+
export { crc32, crc32Update, crc32Finalize } from "@archive/compression/crc32";
|
|
9
|
+
export { compress, compressSync, decompress, decompressSync, hasCompressionStream, type CompressOptions } from "@archive/compression/compress";
|
|
10
|
+
export { createDeflateStream, createInflateStream, hasDeflateRaw, type StreamCompressOptions } from "@archive/compression/streaming-compress";
|
|
@@ -6,10 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export * from "./index.base.js";
|
|
8
8
|
// CRC32
|
|
9
|
-
export { crc32, crc32Update, crc32Finalize } from "./crc32.browser.js";
|
|
9
|
+
export { crc32, crc32Update, crc32Finalize } from "./compression/crc32.browser.js";
|
|
10
10
|
// Compression
|
|
11
|
-
export { compress, compressSync, decompress, decompressSync, hasCompressionStream } from "./compress.browser.js";
|
|
11
|
+
export { compress, compressSync, decompress, decompressSync, hasCompressionStream } from "./compression/compress.browser.js";
|
|
12
12
|
// Streaming compression
|
|
13
|
-
export { createDeflateStream, createInflateStream, hasDeflateRaw } from "./streaming-compress.browser.js";
|
|
14
|
-
// Stream-based unzip API (Node.js; browser build aliases to ./parse.browser.ts)
|
|
15
|
-
export { Parse, createParse } from "./parse.browser.js";
|
|
13
|
+
export { createDeflateStream, createInflateStream, hasDeflateRaw } from "./compression/streaming-compress.browser.js";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare class ByteQueue {
|
|
2
|
+
private static readonly EMPTY;
|
|
3
|
+
private _chunks;
|
|
4
|
+
private _headOffset;
|
|
5
|
+
private _length;
|
|
6
|
+
private _cachedView;
|
|
7
|
+
private _cachedLength;
|
|
8
|
+
constructor(initial?: Uint8Array);
|
|
9
|
+
get length(): number;
|
|
10
|
+
isEmpty(): boolean;
|
|
11
|
+
view(): Uint8Array;
|
|
12
|
+
reset(data?: Uint8Array): void;
|
|
13
|
+
append(chunk: Uint8Array): void;
|
|
14
|
+
read(length: number): Uint8Array;
|
|
15
|
+
/**
|
|
16
|
+
* Return a list of chunk views totaling `length` bytes without consuming.
|
|
17
|
+
*
|
|
18
|
+
* This avoids materializing a contiguous buffer for streaming write paths.
|
|
19
|
+
*/
|
|
20
|
+
peekChunks(length: number): Uint8Array[];
|
|
21
|
+
discard(length: number): void;
|
|
22
|
+
/**
|
|
23
|
+
* Find the first index of `pattern` within the queue.
|
|
24
|
+
*
|
|
25
|
+
* This avoids materializing a contiguous `view()` for common small patterns
|
|
26
|
+
* (ZIP signatures are typically 2-4 bytes).
|
|
27
|
+
*/
|
|
28
|
+
indexOfPattern(pattern: Uint8Array, startIndex?: number): number;
|
|
29
|
+
/** Peek a little-endian uint32 at `offset` without consuming bytes. Returns null if not enough bytes. */
|
|
30
|
+
peekUint32LE(offset: number): number | null;
|
|
31
|
+
/** Peek a single byte at `offset` without consuming bytes. */
|
|
32
|
+
peekByte(offset: number): number;
|
|
33
|
+
}
|