Repository navigation
USBUtils 0.0.11 — shrink and rip-backup release
The ripping half of the tool grew up: media rips (video, and now audio)
keep their backups compressed and checksummed, and a new shrink engine
reclaims the space the media rips leave behind. Four features landed, each
behind its own design audit and regression tests, and the release itself is
now built and published by a tag-driven pipeline instead of by hand.
Shrink games in place
The scene's "ripkit" idea, ported with the tool's safety rules: rebuild a
game's ISO inside its ul chunk stream so duplicate files, zero-filled
extents and unused sectors stop costing disk space. Nothing is deleted
from the directory tree, every file keeps its recorded size, and the
finished image is re-hashed file by file before success is reported.
- What it reclaims: byte-verified duplicate files relinked onto one
shared extent (intro movies in several languages, repeated level data),
all-zero extents collapsed onto the single largest one (publisher
padding, media blanked by a rip), and unused inter-file / trailing
sectors. - Dry run by default, exactly like
fixandclean:
usbutils shrink <index> -d <dir>reports what it would take,
--applydoes it. GUI: game context menu → "Shrink (make smaller)". - Partial-failure safety: ul.cfg is rewritten before any surplus
chunk file is deleted, so a failed cut leaves every chunk on disk and
the game keeps booting. An undeletable rip backup stops the shrink
before anything is rewritten; games with rip sidecars are refused
unless--discard-backupsis passed (the safe flow is:unrip,
shrink, rip again — the new sidecar records the new offsets). - What it refuses: Joliet / UDF hybrid descriptors, Rock Ridge
records, interleaved or non-sequential multi-extent files and
PS2Load-injected games — layouts whose rebuild could desync the image.
The rip → shrink workflow is where the space actually comes back: blanking
a 500 MB movie keeps the ISO size, shrinking afterwards reclaims every
zeroed extent except the single shared one.
Audio rip
The original tool never had one. Standalone audio files (.VAG,
.VAB/.VH/.VB, .ADS/.ASS/.SS2, .MIB/.MIH) can now be
blanked and restored exactly like videos: size-preserving, so the ISO byte
count, every LBA and the drive usage stay the same for the USBExtreme
loader — what you gain is a silent game, not free space. Backups go to an
independent .arip sidecar, video and audio detection never overlap, and
the drive-wide tools (clean up, copy, move) carry the sidecar along and
never delete it. CLI: audio, rip --audio, unrip --audio; GUI:
Advanced → Audio.
Rip backups: compressed and checksummed (USRRIP03)
Both sidecars (.rip / .arip) moved to a v3 format, in two steps:
USRRIP02 — block compression. The backup payload is a sequence of
1 MiB self-describing blocks compressed with a dependency-free LZSS
micro-format; a block that cannot shrink is stored verbatim at ~4 bytes
per MiB of overhead instead of growing. PS2 audio is raw 4-bit ADPCM with
long silence, so .arip backups measure ~3–60% of the original on
synthetic ADPCM-like patterns; already-entropy-coded .PSS video stays
close to raw size.
USRRIP03 — per-entry CRC32. Every entry's record bytes and payload
are checksummed (CRC-32/ISO-HDLC, zlib-compatible). Restore verifies
every entry before writing a single byte into the game: a corrupt
backup is reported while the media are still blanked — a blanked game
still boots, a half-restored one may not — and the sidecar is kept for
recovery from a healthy copy. Folding the record into the checksum also
catches a corrupted index (a flipped offset bit passes every structural
check).
USRRIP01 / USRRIP02 sidecars from older builds still restore, and ripping
more media with a backup upgrades them to v3 — the cheapest way to make
an old backup verifiable.
Audits
Every feature shipped behind an anti-slop audit: audit 002 (audio rip:
backup safety and detectability, honest wording), audit 003 (shrink:
seven findings fixed before the pull request), audit 004 (shrink failure
safety: the ul.cfg ordering, the undeletable-backup abort, cancellation
honored during analysis only). Audit 001's UI findings are also in:
theme-aware WCAG AA colors for the status strip and muted labels, and a
support-files panel the main window was missing.
Behind the scenes
- Tag-driven releases. Pushing a
v*tag now builds and tests the
CLI and GUI on Linux and Windows, packages the same self-contained
bundles as before, and attaches them to the GitHub release — this
release came out of that pipeline. (No SHA256SUMS file is attached:
GitHub shows each asset's SHA-256 digest natively.) - The Windows test suite is green. The tests now open files portably
and close their game streams explicitly, and the Windows build uses
Qt's matching MinGW 13.1 — the suite crashed on Windows before; it runs
clean on both platforms now. - Docs. README rewritten, format documentation for the shrink engine
and the rip sidecar formats, plus a contributing guide, code of conduct
and issue/PR templates.
Testing
Unit tests and the hostile-ISO regression suite pass on this release's
Linux and Windows builds; rip → unrip round-trips export byte-identical
to the source ISO, and the shrink dry-run/apply paths, ul.cfg save
failures and undeletable-backup aborts are covered by regression tests.