@zip.js/zip.js 2.8.33 → 2.8.35
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/README.md +13 -1
- package/deno.json +6 -2
- package/dist/README.md +3 -1
- package/dist/zip-core.js +472 -220
- package/dist/zip-core.min.js +1 -1
- package/dist/zip-fs-core.js +449 -220
- package/dist/zip-fs-core.min.js +1 -1
- package/dist/zip-fs-native.js +476 -226
- package/dist/zip-fs-native.min.js +1 -1
- package/dist/zip-fs.js +478 -228
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-legacy.js +474 -222
- package/dist/zip-legacy.min.js +1 -1
- package/dist/zip-native.js +475 -223
- 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 +477 -225
- package/dist/zip.min.js +1 -1
- package/index-native.cjs +476 -226
- package/index-native.min.js +1 -1
- package/index.cjs +478 -228
- package/index.d.cts +53 -0
- package/index.d.ts +53 -0
- package/index.min.js +1 -1
- package/lib/core/codec-pool.js +2 -2
- package/lib/core/codec-worker.js +6 -2
- package/lib/core/configuration.js +22 -1
- package/lib/core/io.js +209 -56
- package/lib/core/streams/aes-crypto-stream.js +1 -10
- package/lib/core/streams/codec-stream.js +36 -15
- package/lib/core/streams/zip-entry-stream.js +19 -28
- package/lib/core/util/array.js +48 -0
- package/lib/core/web-worker-base.js +3 -3
- 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 +2 -3
- package/lib/core/zip-reader.js +37 -40
- package/lib/core/zip-writer.js +58 -51
- package/lib/core/zlib-streams-inline.js +1 -1
- package/lib/zip-core-base.js +5 -3
- package/lib/zip-fs-native.js +2 -2
- package/lib/zip-fs-wasm.js +2 -2
- package/lib/zip-legacy.js +2 -2
- package/lib/zip-module-native.js +2 -2
- package/lib/zip-module-wasm.js +3 -3
- package/lib/zip-native.js +2 -2
- package/lib/zip-wasm.js +2 -2
- package/package.json +3 -3
- package/worker-message-property-names.js +3 -0
- package/.github/workflows/publish.yml +0 -30
- package/reserved-property-names.js +0 -50
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ zip.js is a JavaScript open-source library (BSD-3-Clause license) for
|
|
|
4
4
|
compressing and decompressing zip files. It has been designed to handle large amounts
|
|
5
5
|
of data. It supports notably multi-core compression, native compression with
|
|
6
6
|
compression streams, archives larger than 4GB with Zip64, split zip files, data
|
|
7
|
-
encryption, and Deflate64 decompression.
|
|
7
|
+
encryption, incremental writing, and Deflate64 decompression.
|
|
8
8
|
|
|
9
9
|
# Demo
|
|
10
10
|
|
|
@@ -14,6 +14,18 @@ See https://gildas-lormeau.github.io/zip-manager
|
|
|
14
14
|
|
|
15
15
|
See here for more info: https://gildas-lormeau.github.io/zip.js/
|
|
16
16
|
|
|
17
|
+
# Bundle size
|
|
18
|
+
|
|
19
|
+
zip.js is tree-shakeable: import named identifiers and your bundler removes what you do
|
|
20
|
+
not use, e.g. the whole write path if you only read zip files. `import * as zip from
|
|
21
|
+
"@zip.js/zip.js"` keeps everything.
|
|
22
|
+
|
|
23
|
+
Smaller entry points are also available, e.g. `@zip.js/zip.js/lib/zip-core.js` embeds
|
|
24
|
+
neither the Web Worker code nor the WASM module, pass `workerURI` and `wasmURI` to
|
|
25
|
+
`configure()` instead. The prebuilt bundles in
|
|
26
|
+
[`/dist`](https://github.com/gildas-lormeau/zip.js/tree/master/dist) are standalone files
|
|
27
|
+
for script tags and AMD loaders, they are not tree-shaken.
|
|
28
|
+
|
|
17
29
|
# Examples
|
|
18
30
|
|
|
19
31
|
## Hello world
|
package/deno.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zip-js/zip-js",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.35",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": "./index.js"
|
|
6
6
|
},
|
|
@@ -16,9 +16,13 @@
|
|
|
16
16
|
},
|
|
17
17
|
"exclude": [
|
|
18
18
|
"rollup*",
|
|
19
|
+
"reserved-property-names.js",
|
|
20
|
+
"mangled-property-names.js",
|
|
19
21
|
"tsconfig.json",
|
|
20
22
|
".vscode",
|
|
21
23
|
".eslintrc.json",
|
|
22
|
-
"
|
|
24
|
+
"benchmarks",
|
|
25
|
+
"docs",
|
|
26
|
+
".github"
|
|
23
27
|
]
|
|
24
28
|
}
|
package/dist/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
**Note**: These bundles are not ES module compatible (you cannot `import` them directly). Use `index.js` at the project root or one of the `zip-*.js` files in [`/lib`](../lib) (e.g. `/lib/zip-core.js`) for ESM usage.
|
|
4
4
|
|
|
5
|
+
**Note**: These bundles are standalone and always contain both `ZipReader` and `ZipWriter`, they are not tree-shaken. With a bundler, importing named identifiers from `index.js` already removes the direction you do not use.
|
|
6
|
+
|
|
5
7
|
Contents:
|
|
6
8
|
|
|
7
9
|
- `zip.js` / `zip.min.js`: Full `ZipWriter` / `ZipReader` bundles with embedded Web Worker code and WASM.
|
|
@@ -14,5 +16,5 @@ Online builder:
|
|
|
14
16
|
Alternatively, you can build your own version of zip.js with the online builder, see https://gildas-lormeau.github.io/zip.js/builder.
|
|
15
17
|
|
|
16
18
|
Notes:
|
|
17
|
-
-
|
|
19
|
+
- Every bundle uses the native `CompressionStream`/`DecompressionStream` APIs when the environment supports them. What differs is the implementation embedded for everything else, i.e. custom compression levels, Deflate64 decompression, and environments lacking these APIs: a WASM module by default, or a pure JavaScript implementation of the Compression Streams API in the files suffixed with `-native`. The suffix names that implementation, it does not mean that these bundles rely more on the native APIs than the others.
|
|
18
20
|
- `zip-legacy.min.js` is the equivalent of `zip.min.js` before the version `2.8`, it relies on a JavaScript implementation of Compression Streams (if used) but only in web workers. Alternatively `zip-native.min.js` includes the Compression Streams implementation in the main environment and the web workers.
|