Compression & Header Removal
Compression
Section titled “Compression”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.
Levels
Section titled “Levels”| Level | Speed | Size | Best for |
|---|---|---|---|
fast |
Fastest | Largest | Quick staging |
normal |
Balanced | Balanced | Default |
ultra |
Slowest | Smallest | Long-term archives |
# 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 onceopenrom-core --compress a.iso b.iso c.iso --format 7z --level ultra
# A whole folderopenrom-core --compress /roms/snes/ --format 7z --level ultra --output /backup/
# Remove the source after a successful jobopenrom-core --compress game.iso --format 7z --delete-sourceExtracting
Section titled “Extracting”openrom-core --extract game.7zopenrom-core --extract game.zip --output /roms/extracted/7-Zip requirement
Section titled “7-Zip requirement”ZIP needs nothing installed. 7Z shells out to a 7-Zip binary, which OpenROM does not bundle. It looks in this order:
OPENROM_7Z— an explicit path.7zz,7z,7za,7zronPATH.- 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.
Smart skip
Section titled “Smart skip”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.
Which format for which content?
Section titled “Which format for which content?”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
Section titled “Copier headers”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 |
Detect
Section titled “Detect”openrom-core --detect-header game.smcThe detector reports a confidence level:
- Certain — the header is unambiguous.
- Likely — the pattern matches but the file should be checked.
Remove
Section titled “Remove”openrom-core --remove-header game.smcopenrom-core --remove-header game.smc --output game_clean.sfcopenrom-core --remove-header game.smc --no-backupBy 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.
When you actually need it
Section titled “When you actually need it”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.