C:\WWW\POSTBEEPNET\PROJECT-DOSKRUNCH-DOCS.HTM — Netscape Navigator _ □ X

pacnpal's software house. Free programs, served like it's 1996.

[ DOSKrunch — Documentation ]

DOSKrunch

DOSKrunch wraps a pile of files on a modern machine into a single self-extracting DOS .EXE. Copy that one file to a vintage box, run it, and it unpacks itself. No DOS-side tooling, no separate archiver on the target.

The part that doesn't exist anywhere else: the decompressor stub is built for the CPU you're aiming at. Pick a target from the original 8086 up to a Pentium III and DOSKrunch ports in a depacker that uses what that chip actually has (32-bit real-mode registers on a 386, BSWAP on a 486, and an MMX block copy from the Pentium MMX up). Everything still runs in 16-bit real mode.

The CLI binary and crate are named doskrunch (lowercase), so the commands below are typed as doskrunch .... "DOSKrunch" is the project's stylized name.

What should I use?

For most DOS machines, use the defaults. No flags:

doskrunch pack out.exe files/

That is aPLib compression on the 8086 target: the best, most compatible choice. aPLib runs on every x86 CPU from the 1981 8088 up and compresses well (the decompressor is about 200 bytes), and the 8086 target runs on any DOS machine. If you don't have a specific reason to choose otherwise, stop here.

Pick something else only for a concrete reason:

Rules of thumb:

Install

DOSKrunch is a single self-contained binary named doskrunch. Two ways to get it.

Build with Cargo (any platform)

Needs a recent Rust toolchain from https://rustup.rs. Same on Linux, macOS, and Windows:

cargo install --git https://github.com/pacnpal/doskrunch --locked

Cargo installs doskrunch into ~/.cargo/bin (on Windows, %USERPROFILE%\.cargo\bin), which rustup already put on your PATH. Check it:

doskrunch --help

Download a prebuilt binary (no Rust needed)

Grab the archive for your platform from the releases page: https://github.com/pacnpal/doskrunch/releases. Builds exist for Linux (x86_64 and aarch64), macOS (x86_64 and aarch64, pick aarch64 for Apple Silicon and x86_64 for Intel Macs), and Windows (x86_64).

On Linux:

tar xzf doskrunch-*-linux-*.tar.gz
chmod +x doskrunch
sudo mv doskrunch /usr/local/bin/
doskrunch --help

On macOS (Gatekeeper quarantines downloaded binaries, so clear it once):

tar xzf doskrunch-*-macos-*.tar.gz
chmod +x doskrunch
xattr -d com.apple.quarantine doskrunch 2>/dev/null || true
sudo mv doskrunch /usr/local/bin/
doskrunch --help

On Windows, unzip the archive and run it from that folder, or move doskrunch.exe into a folder on your PATH:

doskrunch.exe --help

The command arguments are identical on every platform. Windows users type doskrunch.exe (or just doskrunch once it's on the PATH).

Algorithms

CPU targets

Commands

Useful flags:

Examples

Pack a directory with the safe defaults, then inspect and host-extract it:

doskrunch pack out.exe README.md src/
doskrunch inspect out.exe
doskrunch unpack out.exe -d extracted/

Tighter compression for a 386 or better:

doskrunch pack --algo lzma --target 386 setup.exe big-payload/

Fastest unpacking on a real 4.77 MHz 8088:

doskrunch pack --algo lzsa2 --target 8086 fast.exe app/

Links

« back to DOSKrunch