Decompression bombs, and the check before you extract
A 42 KB zip can expand to petabytes. Here's how Purrchiver checks an archive's declared size before extracting it, and when it stops to ask.
A 42 KB zip can expand to petabytes. Here's how Purrchiver checks an archive's declared size before extracting it, and when it stops to ask.
How Purrchiver extracts and compresses multi-gigabyte archives with a near-flat memory footprint — and never leaves a half-written file behind.
libarchive returned NULL for every non-ASCII filename in my Swift tests. The cause is the C locale; the fix is uselocale, scoped to the call.
Purrchiver's first day of development: vendoring libarchive and UnRAR, reading RAR and encrypted 7z, and building a test corpus before the app.