6pack
Compressor and linker for Commodore 64 PRG files. Merges PRGs into one self-extracting program, or writes compressed data for your own decompressor. ZX0, LZSA2, ByteBoozer2 and RLE, each with its own 6502 decoder.
| Linux x64 | 6pack-2026.11.06-linux-x64.tar.gz | 28 MB |
| Windows x64 | 6pack-2026.11.06-win-x64.zip | 29 MB |
Unpack and put 6pack on your PATH. The Windows binary is unsigned, so SmartScreen may warn. --effect custom=file.asm also needs 6asm on your PATH.
Full manual: every mode and option, stream and memory layouts.
Pack
$ cp mandel.kla mandel.prg
$ 6pack sfx demo.prg part2.prg mandel.prg -o demo.sfx.prg
demo.prg+part2.prg+mandel.prg → demo.sfx.prg (32528 → 4355 bytes, 13.4%)
$ 6pack info demo.sfx.prg
file demo.sfx.prg (4355 bytes)
load addr $0801
end addr $1901
payload 4353 bytes
type SFX (BASIC stub: SYS 2061)
algorithm ZX0
payload at +297 (4056 bytes compressed):
compressed 4056 bytes → 32528 bytes (12.5%)
commands 1107 total (393 literal runs, 630 new-match, 84 rep-match)
literals 393 runs · 2420 raw bytes (7.4% of output)
new-match 630 matches · offset $0001–$6EB9 · length 2–15553 avg 36
rep-match 84 matches · length 2–6016 avg 83
max surplus 28475 bytes
Three PRGs become one file you LOAD and RUN. It decompresses to the original addresses and jumps to the entry point, taken from the input's SYS line unless you give -s.

Compare
$ 6pack bench mandel.prg
bench: mandel.prg (10001 bytes, load $6000)
algorithm compressed ratio surplus core
------------ ---------- -------- -------- -----
zx0 3254 32.5% 6749 210
lzsa2 3544 35.4% 6460 249
bb2 3390 33.9% 6613 215
rle 4475 44.7% 5527 74
bench also runs exomizer and pucrunch for comparison if they are installed.
| Algorithm | Decoder | Good for |
|---|---|---|
zx0 (default) |
210 bytes | general use, best ratio |
lzsa2 |
249 bytes | faster decompression |
bb2 |
215 bytes | ByteBoozer2 streams |
rle |
74 bytes | repetitive data, smallest decoder |
Modes
| Mode | Makes |
|---|---|
sfx |
self-extracting PRG |
chain |
several stages, each decompressing and jumping to the next |
mem |
compressed payload only |
level |
indexed archive for loading data at run time |
source |
6asm source: decoder plus data as .byte |
asm |
the decoder alone, as a 6asm include |
info |
inspect a PRG: layout, algorithm, stream stats |
bench |
compare algorithms |
unpack |
back to the original |
Options worth knowing
6pack sfx game.prg -a lzsa2 algorithm
6pack sfx game.prg --blank-screen no badlines, no visible garbage
6pack sfx game.prg --bank 0x34 $01 value on exit
6pack sfx game.prg -x border-cycle effect while depacking
6pack sfx game.prg -d 0x4000 load elsewhere, no BASIC stub
6pack sfx main.prg music.prg@0xA000 merge, overriding a load address
6pack sfx game.prg --watch --run auto rebuild on change, launch VICE
Credits
ZX0 by Einar Saukas. LZSA2 by Emmanuel Marty (zlib licence). ByteBoozer2 by David Malmborg (HCL), maintained by Luigi Di Fraia.