# 7-Zip for johnmcm.com The WebAssembly module behind the Archive Toolkit's installer and disk-image support (/archive-toolkit, /open-file/msi, /open-file/dmg, /open-file/vhd). It is [7-Zip](https://www.7-zip.org/) 26.04 by Igor Pavlov: the `7zz` command-line program (CPP/7zip/Bundles/Alone2), compiled with Emscripten, single-threaded, and **without the RAR code** (`DISABLE_RAR=1`), so nothing under the unRAR licence restriction is in it. 7-Zip is under the GNU LGPL 2.1, with some files under the BSD licence; see `License.txt` in the module folder. RAR archives are opened on the site by libarchive instead. Each request runs a fresh instance, as from a command line: the archive is mounted read-only with WORKERFS, so a multi-GB disk image is read only where 7-Zip looks, and the files extracted are written to memory and read back. This folder publishes exactly what is built: - `source/7z2604-src.tar.xz`: 7-Zip's source as released (https://github.com/ip7z/7zip/releases/tag/26.04); the Dockerfile checks its SHA-256. - `patches/choose-partition.patch`: the one change made to it. 7-Zip opens the partition of a disk image by itself only when there is one; with several it lists them as files. The patch lets `JOHNMCM_PARTITION=` in the environment name partition n of a GPT or MBR disk to open instead, so the page can list each partition's files without copying the partition out first. - `src/sysinfo.c`: the one call Emscripten lacks, reporting 2 GB of memory. - `src/run.mjs`: one run of 7zz (list or extract), used by the worker and by the site's tests. It can also put other files beside the archive, at the paths the archive names them by (a differencing disk's parents, a split VMDK's extents), and ask 7-Zip's NTFS reader for deleted files. - `src/worker.mjs`: the worker the page talks to. - `Dockerfile` and `build.ps1`: the build, with the Emscripten image pinned by digest. Run `build.ps1` with Docker Desktop running; the module goes to `frontend/vendor/local/7zip@3/`. The module is loaded as separate files by the page, so it can be replaced with one built from modified source.