You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The latest pre-built versions can be downloaded here: https://github.com/GMH-Code/JS7z/releases
19
19
20
-
There are four main variants available:
20
+
There are several variants available with a range of features. The fastest, most stable, and recommended version is `[MT+FS+EC]`. The initialisms mean this:
21
21
22
-
- Multi-threaded: `[MT]`
23
-
- Multi-threaded with extended file system functionality: `[MT+FS]`
24
-
- Single-threaded: `[ST]`
25
-
- Single-threaded with extended file system functionality: `[ST+FS]`
22
+
-`MT` or `ST`: Multi-threaded or single-threaded
23
+
-`FS`: Extended file system functionality
24
+
-`EC`: Extra internal exception catching (essential for some scenarios)!
26
25
27
-
The recommended version (if you are not sure which one you need yet), is `[MT+FS]`.
26
+
The recommended version is also available as an [NPM package](https://www.npmjs.com/package/js7z-tools) for *Node.js* users.
28
27
29
28
Usage
30
29
-----
@@ -221,8 +220,8 @@ Multi-Threaded vs. Single-Threaded Builds
221
220
222
221
In most cases, you will want to use a multi-threaded version, but you can fall back to a single-threaded version if you like.
223
222
224
-
- Multi-thread mode works in nearly all modern browsers. It is extremely fast, runs in the background, and returns immediately.
225
-
- Single-thread mode supports less common browsers, but is slower with certain tasks. It also can require a bit more work to use.
223
+
- Multi-thread mode works in nearly all modern browsers and *Node.js*. It is extremely fast, runs in the background, and returns immediately.
224
+
- Single-thread mode supports less common browsers, but is slower with certain tasks. It can also require a bit more work to use.
226
225
227
226
Warning: Calling `callMain()` in single-thread mode *currently* returns after the command completes, so long processes can hang the browser unless you run them in a Worker. You should still use `onExit(exitCode)` to detect a proper exit. The single-threaded version may also run in the same asynchronous way one day.
228
227
@@ -269,10 +268,15 @@ You can insert extra parameters between `emmake make` and the rest of the comman
269
268
270
269
Usage of these compilation flags will be displayed in 7-Zip's output.
271
270
272
-
Selecting extra exception catching will add `+EC` to the flags. This feature allows you to see further details of failures, such as extraction security issues, corrupt archive data, and incorrect passwords. Using this increases the build size, so it is switched off by default.
271
+
Selecting extra exception catching increases the build size, but it allows you to see further details of failures, such as extraction security issues, corrupt archive data, and incorrect passwords.
273
272
274
273
At the final stage of the build, `js7z.js` and `js7z.wasm` will be written into the `Alone2/b/g` folder.
275
274
275
+
There are some other parameters available that slightly alter the exported build, but they do not affect the WebAssembly side:
276
+
277
+
- To export a JavaScript ES6 module, add `EXPORT_ES6=1`. This will also change the name of `js7z.js` to `js7z.mjs`.
278
+
- To generate a TypeScript definitions file, add `EMIT_TSD=1`. This will create `js7z.d.ts`.
279
+
276
280
---
277
281
278
-
This documentation Copyright (C) 2024 Gregory Maynard-Hoare. See the `7z-Src/DOC` folder for licence information.
282
+
This documentation Copyright (C) 2025 Gregory Maynard-Hoare. See the `7z-Src/DOC` folder for licence information.
0 commit comments