Skip to content

Compression & Header Removal

OpenROM compresses to ZIP with its own encoder, and to 7Z by calling an installed 7-Zip binary. Archives can be extracted in batch with progress reporting.

Level Speed Size Best for
fast Fastest Largest Quick staging
normal Balanced Balanced Default
ultra Slowest Smallest Long-term archives
Terminal window
# ZIP (no external tools)
openrom-core --compress game.iso --format zip --level normal
# 7Z (needs a 7-Zip binary)
openrom-core --compress game.iso --format 7z --level ultra
# Several files at once
openrom-core --compress a.iso b.iso c.iso --format 7z --level ultra
# A whole folder
openrom-core --compress /roms/snes/ --format 7z --level ultra --output /backup/
# Remove the source after a successful job
openrom-core --compress game.iso --format 7z --delete-source
Terminal window
openrom-core --extract game.7z
openrom-core --extract game.zip --output /roms/extracted/

ZIP needs nothing installed. 7Z shells out to a 7-Zip binary, which OpenROM does not bundle. It looks in this order:

  1. OPENROM_7Z — an explicit path.
  2. 7zz, 7z, 7za, 7zr on PATH.
  3. The default Windows install locations under %ProgramFiles%\7-Zip\.
Platform Install
Linux sudo apt install p7zip-full (or your distro’s 7zip)
macOS brew install sevenzip
Windows Install 7-Zip from 7-zip.org

If no binary is found, 7Z jobs fail with a clear message rather than crashing. Encrypted archives are not supported and fail fast.

Formats that are already compressed — CHD, CSO, ZSO, RVZ, ECM, 7Z and ZIP — are skipped automatically in batch mode. This prevents double compression, which costs time and usually makes the file larger.

For disc images, CHD beats ZIP and 7Z: it is purpose-built for them, smaller, and mountable by emulators without extraction. Use ZIP or 7Z for cartridge ROMs and for sharing with people who do not have OpenROM.

Copier headers are extra bytes prepended by 1990s backup devices. They break DAT matching, patch checksums and occasionally the emulator itself.

System Header Size
NES iNES header 16 bytes
SNES SMC / SWC / FIG copier header 512 bytes
Game Boy / Game Boy Color Copier header 512 bytes
Terminal window
openrom-core --detect-header game.smc

The detector reports a confidence level:

  • Certain — the header is unambiguous.
  • Likely — the pattern matches but the file should be checked.
Terminal window
openrom-core --remove-header game.smc
openrom-core --remove-header game.smc --output game_clean.sfc
openrom-core --remove-header game.smc --no-backup

By default OpenROM writes game.smc.bak before doing anything and puts the cleaned ROM in a separate output file. The original is never modified. Existing backups are never overwritten, and --no-backup is available when you manage backups yourself.

SNES removal validates the internal header before stripping, which prevents a clean ROM from being stripped twice — a common way to destroy a good dump.

Modern emulators usually tolerate headered ROMs. Remove the header when:

  • a patch expects a headerless ROM (most patches do),
  • a DAT refuses to match,
  • an emulator or flash cart rejects the file.