Concepts
Performance
Every number on this page comes from one results file, measured with Peel 1.4.0, with the method, the limits and the script to repeat it.
What was measured
The measurements live in one file, engine-scores.json, and the engine page draws from it. They were taken on
2026-11-25 with Peel 1.4.0 on an Apple M4 Pro with 14 cores, under macOS
27.2.1. The reference tools were zstd 1.5.7, Apple
gzip, xz 5.8.4 and bzip2
1.0.8.
There are two test files:
| File | What it is | Size in bytes |
|---|---|---|
| Program | Peel’s own command-line tool | 18,913,504 |
| Source | A tar of Peel’s Rust and Swift source | 5,171,200 |
A third test unpacks a tree of 1,151 files from Peel’s repository,
64,391,997 bytes in all, that Peel packed as ZIP, .tar.zst,
.tar.gz, .tar.xz and 7z, once with Peel and
once with macOS’s bsdtar.
The method, as the file records it:
- Each timing is the median of 5 runs, in milliseconds of wall-clock time, including the start-up of the program. The level sweep behind the frontier plot uses 3 runs.
- Every tool writes its output to a file on the same disk.
- Peak memory is the largest resident size in one extra run, read with
/usr/bin/time -l. - Peel is run at its default level for each format. The reference tool is run at its own default, which for bzip2 is level 9 where Peel uses 6.
Packing
Show the numbers
| Format | Peel ms | Tool ms | Ratio | Weissman |
|---|---|---|---|---|
| zst | 29 | zstd 29 | 2.39× | 1.90 |
| gz | 505 | gzip 498 | 2.32× | 1.00 |
| xz | 4054 | xz 3993 | 3.25× | 1.04 |
| bz2 | 825 | bzip2 848 | 2.45× | 0.98 |
For the program file, Peel and each format’s own tool land in the same place. The ratio is the same for gzip (2.3238 against 2.3238) and xz (3.2475 against 3.2475). Packing time is within a few percent for every format: gzip 504.68 ms against 498.17 ms, xz 4,053.85 ms against 3,993.15 ms, bzip2 825.38 ms against 847.99 ms. Peel’s bzip2 ran at level 6 and the reference at level 9, which is why its ratio is a little lower, 2.452 against 2.4711.
The one place Peel’s output is far from gzip -6 is
Zstandard. At the default level 3, Peel packs the program in 28.95 ms to
a ratio of 2.3937, while gzip -6 takes 504.68 ms for
2.3238. That gap, a smaller file made much faster, is what the headline
score measures. Against zstd itself, Peel is level: 28.95
ms against 28.55 ms, at the same ratio of 2.3937.
The Weissman score
The Weissman score was invented for HBO’s Silicon Valley. It folds compression ratio and packing time into one number, relative to a reference. The definition used here:
W = α × (r / r̄) × (log T̄ / log T)| Symbol | Meaning |
|---|---|
r |
The tool’s compression ratio, how many times smaller the file gets |
r̄ |
The reference’s ratio. The reference is gzip -6 on the
same file |
T |
The tool’s packing time, in milliseconds |
T̄ |
The reference’s packing time |
α |
A scaling constant, 1 here, so the reference scores exactly 1.00 |
Peel’s Zstandard on the program file scores 1.901, which the engine
page rounds to 1.90 and states as +90% against gzip -6. The
other three formats score near 1.0 on the same file: gzip 0.998, xz
1.045 and bzip2 0.976, against 1.0 for the reference itself.
The limits matter more than the number:
- It measures packing only. Unpacking speed and memory do not enter it. The results file carries them separately.
- It depends on the unit. The logarithm of a time depends on the unit it is taken in, so a different unit gives a different score. These results use milliseconds throughout.
- It rewards speed unevenly. A speedup changes the score more when the starting time is short.
- The reference is a choice.
gzip -6is a common baseline, not a neutral one. - For unpacking, only time counts. Both tools read
the same archive, so the unpack score is
log(bsdtar time) / log(Peel time).
The engine page also offers other scores from the same file, among them a composite and a Pareto frontier of size against speed. No single score says which tool is best.
Unpacking
Show the numbers
| Format | Files | Peel ms | bsdtar ms | Unpack score |
|---|---|---|---|---|
| zip | 1151 | 105 | 245 | 1.18 |
| tar.zst | 1151 | 125 | 154 | 1.04 |
| tar.gz | 1151 | 155 | 228 | 1.08 |
| tar.xz | 1151 | 1079 | 1218 | 1.02 |
| 7z | 1151 | 1224 | 1301 | 1.01 |
Peel was faster than bsdtar on all five formats in this
tree, by different margins:
| Format | Peel | bsdtar |
|---|---|---|
| ZIP | 104.75 ms | 244.55 ms |
.tar.gz |
155.44 ms | 227.74 ms |
.tar.zst |
125.15 ms | 153.75 ms |
.tar.xz |
1,079.03 ms | 1,218.02 ms |
| 7z | 1,224.35 ms | 1,300.75 ms |
The gap is widest for ZIP and narrowest for 7z and
.tar.xz. For the compressed single files, decoding the
program file to a file, Peel and the reference tool are close, and
neither always wins: .zst 22.2 ms against 20.43 ms for
zstd, .gz 34.29 against 32.77,
.xz 211.3 against 206.63, and .bz2 378.73
against 431.82.
One detail of the method: bsdtar here is
tar -x fed by the tool’s own -d -c, because
Peel opens a tar it finds inside a compressed file by itself.
Memory
Peel streams and does not load an archive into memory. These are bytes of peak resident size on the program file:
| Format | Peel, packing | Tool, packing | Peel, unpacking | Tool, unpacking |
|---|---|---|---|---|
| zst | 35,307,520 | 36,503,552 | 47,923,200 | 8,224,768 |
| gz | 4,947,968 | 1,572,864 | 44,548,096 | 1,327,104 |
| xz | 102,285,312 | 124,682,240 | 53,116,928 | 35,438,592 |
| bz2 | 9,191,424 | 7,798,784 | 47,677,440 | 4,800,512 |
Peel’s unpacking peaks at between 44,548,096 and 53,116,928 bytes for every format here, higher than each reference tool. It is bounded, but it is not the lowest.
Reading part of a file
peel cat --offset N --length N returns a window of one
member instead of the whole thing. The same read is available as the MCP
read_member tool with offset and
length, and as peel_session_read_member_range
in the C library.
peel cat demo.zip project/docs/chapter-1.md --offset 10 --length 30; echo " [exit $?]"; peel cat demo.zip project/docs/chapter-1.md --max-bytes 100; echo "exit $?"
lorem ipsum dolor sit amet lor [exit 0]
peel: project/docs/chapter-1.md is larger than the read limit of 100 bytes; raise it with --max-bytes
exit 10peel 1.4.0, recorded 2026-11-26.What it costs depends on the format, and the honest rule is simple:
- The memory used is bounded by the window, whatever the member’s size. A window is at most 1 GiB.
- A compressed or solid member is decoded from its start, and the bytes before the offset are discarded. A deep offset costs the read up to it, and decoding stops once the window is full.
- A session reuses the open archive, so repeated windows skip the open. A ZIP keeps its central directory in memory.
- RAR is read through a scratch file and is limited to members of 1 GiB.
The results file measures one case: a 1 MiB read from the middle of
the program file Peel made, against decoding the whole file. The reading
is Peel’s peel cat --offset --length, and times include
starting the program.
| Format | 1 MiB from the middle | The whole file |
|---|---|---|
| zst | 11.48 ms | 22.2 ms |
| gz | 18.39 ms | 34.29 ms |
| xz | 115.67 ms | 211.3 ms |
| bz2 | 206.7 ms | 378.73 ms |
Each window read costs about half the full decode. That is consistent with the rule above: decode from the start up to the middle of the file, then stop. The other tools cannot read part of a file, so they have no comparison row. The cost of a read grows with its offset, so a window near the end of a large compressed member costs nearly a full decode.
How Peel packs on every core
peel create uses every core the system reports. How it
does so differs by format, and the output is always a standard file that
stock tools read:
- zstd. libzstd’s multithreaded mode, with a job per
core when the input is too small to give every core a default-sized job,
never smaller than libzstd’s 512 KiB minimum.
--longkeeps libzstd’s own jobs and turns on long-distance matching with a 128 MiB window. - xz. liblzma’s threaded encoder, whose default blocks are three times the dictionary. For an input smaller than the default blocks it cuts blocks as small as 1 MiB so more cores work, within a 2 GiB memory budget. Smaller blocks cost some ratio, and the blocks then decode in parallel too.
- gzip. The pigz method: 128 KiB chunks deflated on separate threads, each primed with the 32 KiB before it and joined by sync flushes into one gzip member. The chunk size is fixed, so the output depends on the input and level, not on the core count.
- bzip2. Each chunk is sized to fill exactly one bzip2 block, compressed on its own thread, and spliced at the bit level into one stream. Chunk boundaries depend only on the input and level.
Of these, multithreaded zstd and xz are in 1.4.0. The per-core zstd jobs, the small xz blocks and the parallel gzip and bzip2 writers are in the source after 1.4.0, so the 1.4.0 results above do not include them.
Measure it yourself
The script that wrote the results file is in the repository and uses only the Python standard library:
python3 scripts/measure-engine-scores.py --peel "$(command -v peel)" --runs 5 --sweep-runs 3It writes site/data/engine-scores.json and a CSV beside
it. It needs zstd, gzip, xz and
bzip2 on the path, macOS’s bsdtar, and a git
checkout of the repository, because the unpack test packs its tracked
Rust and Swift files. Quit other work first, record the load average,
and measure the build you will ship: the numbers in the results file
name the release they describe.
To time your own data, run the commands the script runs:
time peel create -q -f out.tar.zst ~/Project
time peel x -q -f -o scratch out.tar.zst
time peel cat -q --offset 5000000 --length 1048576 out.tar.zst path/in/archive > /dev/nullSee the CLI reference for the options, architecture for how a read flows, and the engine page for the charts and the downloads.