vgm_cmp

From vgmrips

vgm_cmp does some lossy (but inaudible) compression on the internal VGM data.

This tool can greatly reduce the size of a VGM by stripping unnecessary commands and highly optimizing delays. The file size of compressed files usually decreases to 50-60% (Sega Master System with YM2413) or 15-40% (NeoGeo Pocket).

Although there is a loss of data, a sample-by-sample comparison results in the exactly same output. (Verified with T6W28, YM2413, YM2612, RF5C68, AY8910, YMF271, YMF262, YMZ280B, and Y8950.)

The tool resets its internal data at the Loop Offset to make loops safer.

Usage

Note: NEVER use this tool on untrimmed files. Trimming with vgm_trim does NOT work after optimization.
vgm_cmp -do6258 Input.vgm [Output.vgm]

-do6258 is an optional switch to be used with OKIM6258 VGMs. See also opt_oki.

If you don't specify output.vgm, vgm_cmp creates an output filename by adding "_optimized" to the input filename.