Decompression bombs, and the check before you extract
A decompression bomb is an archive built to expand far beyond its size — the
best-known, 42.zip, is 42 KB on disk and about 4.5 petabytes extracted.
Unpack one without looking and it fills your disk. On May 23 Purrchiver started
looking first.
Reading the label before opening the box
Before extracting anything, Purrchiver reads the archive’s table of contents and adds up the size each file says it will be. That costs almost nothing — no data is decompressed — and answers two questions.
Will it fit? If the total is more than 90% of the free space on the destination disk, Purrchiver stops and tells you, with the numbers, rather than filling the disk and failing partway through.
Does it look like a bomb? If the output would be at least 100 times the archive’s size and at least 10 MB, Purrchiver asks before continuing. Both conditions matter: text and disk images routinely compress 10× or more, and a 1 KB file that expands to 100 KB is normal. The check is tuned so ordinary, well-compressed archives never trigger it.
Cancel is the default
When the prompt does appear, it shows the archive size, the declared output size, and the ratio, and the highlighted button is Cancel. Extracting anyway is always possible — some legitimate archives really are that compressible — but it has to be a choice.
Update, October 23: in 1.0 and 1.0.1, pressing Return on this warning did nothing; you had to click Cancel or press Esc. From 1.1 New in 1.1, Return and Esc both cancel, and Continue Anyway still has no keyboard shortcut.
Why a declared size isn’t the whole story
An archive’s table of contents can lie, and a malicious one might. So the check before extraction isn’t the only protection — there are limits that apply while extracting, too. The decompression-bomb help page covers all of them.