Skip to main content
coreydaley.dev

How Purrchiver is tested

When you open an archive, you want two things: every file back, and every file exactly as it went in. Purrchiver has more than 1,800 automated tests, built around the archives most likely to get that wrong.

Exact files, not “it opened”

“It opened without an error” isn’t a pass. The content tests compare the extracted files with the originals, byte for byte, so even one wrong byte is a failure.

The odd files, on purpose

The test archives include:

  • Encrypted archives: old ZipCrypto and AES-256 ZIPs, and 7z and RAR5 archives with their file list encrypted too.
  • Filenames in Chinese, Japanese, Korean, Cyrillic, Arabic, Hebrew, and emoji.
  • Size edges: an empty ZIP, a ZIP with 100,000 files, folders nested 50 deep, and files of 4 GiB minus one byte, exactly 4 GiB, and one byte more, the line where ZIP needs its 64-bit extension.
  • Multi-part RAR and 7z sets, hard links, permissions, and macOS metadata.

They’re built by scripts and checked in, so every test run checks exactly the same files.

Checked against the tools you’d use

A round trip through Purrchiver alone can hide a bug that’s in both its writer and its reader. So archives Purrchiver makes are opened with 7-Zip, unzip, tar, xz, zstd, and Apple’s own aa, among others, and archives those tools make are opened in Purrchiver, compared byte for byte. If Purrchiver makes an encrypted 7z, 7-Zip has to be able to open it.

Broken archives don’t take it down

New in Purrchiver 1.1. If you don't see it, update Purrchiver from the App Store.

Purrchiver is run against more than 150 deliberately broken archives, collected by libarchive, Go, Apache Commons Compress, and other projects, opening, extracting, and recovering each one on every test run. None may crash or hang Purrchiver or write outside the folder you chose, and a partly recovered file always says “(incomplete)” in its name. Repair from .par2 recovery data is checked against test files from par2cmdline’s and Rust-PAR2’s own tests.

Safe by default

Tests make sure an archive can’t write outside the folder you extract into, however its paths are disguised, and that a small archive built to expand to an enormous size is caught before it fills your disk. More on both in Zip slip is more than ../ and decompression bombs.

The app, not just the engine

About 115 UI tests drive the real app: making an archive in its windows, opening it, extracting it, and checking the files on disk. The built app is checked too, not just the code it was built from.

What isn’t covered yet

Purrchiver doesn’t run its own fuzzer yet, and passwords with non-ASCII characters aren’t supported for ZIP, 7z, or RAR (Purrchiver says so rather than failing silently). When a bug gets through, it gets a test of its own.

Download on the Mac App Store

Free forever to open and extract anything. $9.99 once for the advanced tools. No trial, no subscription.

More detail