How to compression level optimizer vs cli compression tools
- Step 1Decide if you need all nine levels — A CLI loop
for l in 1 2 3 4 5 6 7 8 9; do zip -$l ...; donemeasures every level. This tool measures 1, 3, 6, 9 only. If the in-between levels matter to you, the CLI is the right call. - Step 2Decide if you need non-DEFLATE engines — 7z's LZMA, zstd and brotli often beat DEFLATE substantially on text. This tool is DEFLATE/ZIP only. For those engines, use their CLIs — JAD has no equivalent in-browser.
- Step 3Decide on privacy and install constraints — Both the browser tool and a local CLI keep data on your machine. The browser path additionally needs no install or admin rights — handy on managed corporate laptops.
- Step 4Run the browser benchmark — On a Pro+ plan, open /archive-tools/compression-level-optimizer, drop your files, and Process. Read the four-row JSON table and Best level / Best size chips.
- Step 5Cross-check against the CLI if needed — For a sanity check, run
zip -6 out.zip filelocally — the resulting size should be within a byte or two of the level-6 row, since both use standard DEFLATE. - Step 6Pick your tool per task — Quick four-level DEFLATE check with no install: browser. Full 1–9 sweep, alternate engines, or CI automation: CLI.
Level Optimizer vs CLI compression benchmarking
Browser tool behaviour is from lib/archive/archive-processor.ts (optimizeLevels). CLI columns describe standard zip/gzip/7z behaviour, not a JAD feature.
| Dimension | JAD Level Optimizer | zip / gzip CLI | 7z CLI |
|---|---|---|---|
| Levels swept | 1, 3, 6, 9 (fixed) | Any of 1–9 you script | Custom -mx levels |
| Engine | DEFLATE (fflate) | DEFLATE | LZMA/LZMA2 (+others) |
| Typical text ratio | DEFLATE-class | DEFLATE-class | Usually best (LZMA) |
| Install needed | None (browser) | Yes (binary) | Yes (binary) |
| Upload to server | No (in-tab) | No (local) | No (local) |
| Scriptable / CI | No API | Yes | Yes |
| Auto-picks winner | Yes (smallest ZIP) | No (manual) | No (manual) |
| Cost | Pro tier | Free | Free |
Which tool for which question
Match the question to the right instrument. JAD links are real sibling archive tools.
| Your question | Best tool | Why |
|---|---|---|
| "Is level 9 worth it for this ZIP?" | JAD Level Optimizer | Four-level sweep with timing, no install |
| "What's the size at every level 1–9?" | zip CLI loop | Tool only tests 1/3/6/9 |
| "Would LZMA/7z beat DEFLATE here?" | 7z CLI | Tool is DEFLATE only |
| "What's the ratio of files in an existing archive?" | Compression Ratio Calculator | Reads ratios from a built archive |
| "Build the archive at a level I already chose" | Smart Archive Compressor | Explicit 0–9 level control |
| "Report sizes across many archives" | Batch Compression Report | Bulk size/ratio reporting |
Cookbook
Side-by-side runs showing where the browser benchmark agrees with — and where it can't replace — a CLI.
Browser four-level sweep vs a full CLI 1–9 loop
The browser tool gives you the four decision points fast. The CLI fills in the gaps if you actually need level 4, 5, 7 or 8.
JAD Level Optimizer (text input, 4 MB JS): L1 -> 1.31 MB L3 -> 1.15 MB L6 -> 1.04 MB L9 -> 1.03 MB bestLevel: 9 CLI full sweep (for l in 1..9; do zip -$l ...): L1 1.31 L2 1.24 L3 1.15 L4 1.10 L5 1.06 L6 1.04 L7 1.03 L8 1.03 L9 1.03 Same numbers at shared levels; CLI shows the in-betweens.
Verifying the browser output is a standard ZIP
The downloaded archive is plain DEFLATE ZIP — any CLI can open it. There is no JAD wrapper or proprietary metadata.
# After downloading the optimizer's winning ZIP: unzip -l compression-levels.json # it IS a zip, despite the name # Archive: compression-levels.json # Length Date Time Name # 4194304 2026-06-13 10:22 app.bundle.js unzip compression-levels.json -d out/ # extracts cleanly
When DEFLATE is the wrong engine entirely
On large text corpora, 7z/LZMA can roughly halve a DEFLATE result. The Level Optimizer can't show this because it's DEFLATE-only — use the 7z CLI for that comparison.
Input: 50 MB of log files JAD Level Optimizer (DEFLATE): bestLevel 9 -> 11.8 MB (76.4%) 7z CLI (LZMA2, -mx9): logs.7z -> 6.2 MB (87.6%) Lesson: if engine choice is the real question, reach for 7z.
Privacy: no upload, no install
On a managed laptop where you can't install software and can't send data off-box, the browser tool is the only option that satisfies both constraints at once.
Constraints: no admin rights, data must stay on device zip/7z CLI: needs install (blocked) -> no cloud zipper: uploads your files -> no JAD Optimizer: browser, no install, no upload -> yes (Pro)
Cross-checking a CLI build against the benchmark
Use the optimizer to confirm a CI artifact isn't leaving easy savings on the table at its current level.
CI currently ships: zip -1 release.zip dist/* (fast build)
Optimizer on the same dist/:
L1 -> 8.9 MB L6 -> 6.1 MB L9 -> 6.0 MB
Decision: switch CI to -6 for 2.8 MB smaller release,
negligible extra build time.Edge cases and what actually happens
Expecting all nine levels like a CLI loop
By designThe tool tests a fixed four — 1, 3, 6, 9. For the in-between levels run a zip -N loop; there is no option to add levels here.
Expecting LZMA/7z-class ratios
Not supportedIt only uses fflate DEFLATE. It will never match 7z/LZMA on compressible text. Use the 7z CLI when the engine itself is the variable.
Looking for a scriptable CLI from JAD
Not supportedThere is no JAD CLI or API — archive tools are browser-only. For automation, use the fflate npm package (same engine) directly.
Free user comparing tools
Upgrade requiredThis tool is Pro-tier; Free accounts can't run the browser side of the comparison. A local CLI is free, which is itself a fair point in the CLI's favour.
Output filename ends in .json but it's a ZIP
ExpectedThe Download is the smallest ZIP's bytes saved as compression-levels.json. unzip and 7z open it fine — the name is cosmetic, the content is a real ZIP.
Sizes differ by a few bytes from the CLI
ExpectedDifferent DEFLATE implementations make minor header/encoder choices, so fflate and zip can differ by a handful of bytes at the same level. The ratios track closely.
Huge input vs CLI throughput
By designOn multi-hundred-MB inputs a native CLI is faster and isn't bounded by browser memory. The optimizer caps at 500 MB (Pro) / 2 GB (Pro+Media/Developer) per file.
Comparing on an already-compressed file
ExpectedBoth browser and CLI will report near-0% on JPEG/MP4/ZIP inputs. That's the data, not the tool — neither can compress entropy-dense bytes.
Frequently asked questions
Why only four levels instead of 1–9?
The code uses a fixed [1, 3, 6, 9] array — fast, and those four cover the practical decision points (fastest, light, default, max). For every level, loop a CLI.
Is the browser output a real ZIP I can open in 7-Zip?
Yes. It's standard DEFLATE ZIP from fflate. unzip, 7z, Windows Explorer and macOS Archive Utility all open it — there's no proprietary format.
Will this beat 7z on my files?
Usually not on compressible text — 7z's LZMA generally wins there. This tool is DEFLATE/ZIP only and is for choosing a ZIP level, not comparing engines.
Can I script this in CI?
Not directly — there's no JAD API. For CI, use the fflate npm package (the same engine) or your platform's zip/gzip.
Is the browser tool slower than the CLI?
On small-to-medium files the difference is negligible. On very large files a native CLI wins, and it isn't bounded by the browser's memory the way the tool is.
Does it cost money where the CLI is free?
Yes — it's Pro-tier. The trade is no install, no upload, an auto-picked winner, and a clean four-level table. CLIs are free but you script and rebuild yourself.
How close are the sizes to gzip -6?
Very close. fflate level 6 and gzip -6/zip -6 all use standard DEFLATE, so sizes typically match within a few header bytes.
What if I want per-entry ratios of an existing archive?
Use Compression Ratio Calculator — it reports the ratio of each entry inside an archive you already have, rather than running a level sweep on raw files.
What if I already know the level I want?
Skip the benchmark and use Smart Archive Compressor, which has an explicit 0–9 level control to build the archive directly.
Can I compare many archives at once?
For bulk size/ratio reporting across multiple archives, use Batch Compression Report. The Level Optimizer benchmarks one bundle per run.
Does the comparison require an internet connection?
The page must load once. After that, fflate runs locally — like a CLI, the compression itself doesn't touch the network.
Which should I default to?
If you just need a quick, private, install-free read on whether a higher ZIP level pays off: the browser tool. If you need every level, alternate engines, or automation: the CLI.
Privacy first
Every JAD Archive tool runs entirely in your browser using fflate, @zip.js/zip.js, and the libarchive WASM bridge. Your archives never leave your device — verified by zero outbound network requests during processing.