Why archives should open like folders

The one decision the whole app is built on.

By · · Part of Files, Unwrapped: building a Mac archive app

Double-click a .zip on a Mac and one of two things happens. If it's a plain ZIP, Archive Utility quietly extracts it and leaves a new folder sitting next to the original, which you now have two of. If it's a .rar or a .7z, Archive Utility can't open it, and you go hunting for a tool. Either way you've been handed a chore before you've even seen what's inside.

I kept bumping into this and kept thinking the same thing: I didn't want to extract the archive. I wanted to look in it. Those are not the same act, and the Mac treats them as if they were.

That gap is the entire reason Peel exists.

An archive is already a folder

Strip away the compression and an archive is a tree of files with names, sizes and dates, the same thing a folder is. The only difference is that the bytes are packed and you need a key to read them. So why does opening one feel so unlike opening a folder?

Mostly for historical reasons. The tools we inherited were built around a single verb: extract. You point them at an archive, they spill its contents onto the disk, and then you go find what you actually wanted. The Unarchiver and Keka are good at this, and for years that's what I reached for, but they're all variations on the same assumption: that the first thing you want to do with an archive is empty it out.

I don't think that assumption holds. Most of the time I open an archive I'm checking: Is the file I need in here? Did the export include the right folder? What's this thing someone sent me? Extraction is the wrong tool for checking. It's slow, it makes a mess, and it commits you to the whole thing when you wanted one file or just a glance.

A folder doesn't make you commit. You open it, you look, you close it, and nothing has changed on disk. That's the behavior I wanted archives to have.

What Peel does instead

In Peel, double-clicking an archive can open a Finder window showing what's inside. What a double-click does is your choice: browse, extract or ask every time (it asks until you choose). When browse is the choice, you move through the archive the way you move through any folder: arrow keys, Quick Look, drill into subfolders, back out. Peel first tries to mount the archive as a read-only volume (PeelFS), which writes nothing to disk, but that only works once macOS lets the module run, and on the macOS release I'm testing the File System Extensions switch doesn't save third-party modules (Apple feedback FB25209882). Until then Peel unpacks the archive into a browse folder beside it, and clears that folder away later. If the archive wraps a single top-level folder, Peel opens straight into it instead of making you click through a redundant wrapper, because that wrapper is an artifact of how the archive was made, not something you care about.

Extraction still exists, of course; eventually you want the real files for some other app. But in Peel it's a deliberate second step, not the price of admission. When you do want the files out, Peel puts them next to the archive by default, where you were already looking.

Two smaller features fall out of the same idea. Press Space on an archive and Quick Look shows you the contents as a list, so you can peek without even opening it; if a 7z or RAR hides its names behind a password, Quick Look shows a lock instead of pretending. And Spotlight indexes the names inside TAR, 7z and RAR archives (and single-file gz, bz2 and xz), so searching for a file by name can surface the archive that contains it. ZIP names aren't indexed. Both are just "treat it like a folder" taken to its conclusion: a folder you can preview, a folder you can search.

The hard part is making "look" feel instant

It's easy to say "browse the archive without extracting it." It's harder to make it feel like a folder, because a folder is instant and a compressed stream is not. If opening an archive meant decompressing all of it in the background, the illusion would collapse the first time someone opened a 4 GB .7z to read one text file.

So much of the engineering under this idea is about random access: reading the directory of an archive cheaply, and pulling a single entry out without unpacking the rest. A ZIP allows that, because every entry can be reached directly. A TAR, a solid 7z or a solid RAR doesn't: an entry can only be decoded after the ones before it, so on those the first read unpacks the whole archive once, and later reads are quick. That's what lets browsing feel like browsing instead of like waiting, most of the time. A lot of the format work in Peel, and a lot of what is genuinely hard about archive formats, exists in service of this one experience. The product decision came first; the engine is what it costs.

I'll write more about that machinery in later posts (mounting an archive as a real Finder volume turned out to be its own adventure). But it's worth being honest that the nice-sounding product idea is cheap and the thing that makes it feel good is not, and a big solid archive still pays for its first open.

Where the idea has limits

I try not to oversell this. There are real reasons extraction is the default elsewhere: other apps need actual files on disk, not a view into a container, and sometimes you genuinely do want the whole thing out. Peel doesn't pretend otherwise. What it changes is what's on offer: browsing in place is a first-class choice, and extraction is something you pick when you mean it, not a reflex the tool makes for you.

There's also a trust cost to opening things. An archive is a pile of someone else's bytes, and a tool that reads untrusted archive formats is a tool that reads untrusted input all day long. "Show me what's inside" is a promise you can only make if the reader underneath it is careful. That, too, is a later post.

Files, unwrapped

The name came out of all this. An archive is wrapping, a layer around the files you actually want. Peel's job is to take the wrapping off the experience without necessarily taking it off the disk: the files, unwrapped, available to look at the moment you ask, extracted only when you decide.

Everything else in the app is downstream of that one sentence. The format breadth, the Finder volume, the Quick Look and Spotlight extensions, even the contortions of shipping two editions through two different Apple front doors, all of it is in service of a single stubborn idea: an archive should open like a folder, because that's what it already is.

Peel is free for macOS 13 or later. Get Peel, or install it with brew install --cask snackstudio/tap/peel.

Next in the series: Mounting a ZIP as a Finder volume: a field report from FSKit