It's time for a BIG update!
After a month of stewing over decompressor outputs and tech papers, I finally learned enough about MP3s to make an actual compression optimizer (sort of like rehuff for Vorbis).
Using the new -z switch in 1.10 will enable a brute-force Huffman optimization which slightly improves overall compression at the loss of quite a bit of speed. How much it helps is highly dependant on the encoder. LAME encodes tend to be ~0.02% smaller (ie. don't bother ) but I've gotten a 10% improvement over the normal mp3packer output for some files (unknown encoders...) (*)
The -z switch will not help with MPEG2 / 2.5 audio, or short blocks (I don't really feel the need to include support for them) and it is fairly intolerant to errors. If you see a line that looks like this:
WARNING: recompression error on frame 10862
it means that the recompression of that frame was thrown out and the input data was used instead, as though -z was not specified.
Also added was support for directories (at last ) and support for deleting files.
The new switches for deleting files are:
--keep-ok (out | both)
--keep-bad (in | out | both)
The first is used for every file which did not report a sync or buffer error. If you set it to "out" it will only keep the output file, and delete the input file.
The second is used in the rest of the files (the ones which did have errors). Using "in" will leave only the input file, and not write an output.
A few examples:
--keep-ok both --keep-bad both
This is the default. It keeps both input and output files in all cases.
--keep-ok out --keep-bad in
This will essentially move and repack the error-free files, while leaving the files with errors alone.
-u --keep-ok out --keep-bad in
Same as previous, but it will move the files with errors and repack the other files in-place.
-u --keep-ok out --keep-bad out
This will replace every file with its repacked version.
Note that, as stated before, a recompression error is actually just a warning. A file with only recompression errors will be covered under the --keep-ok option.
(*) I actually got an 83% savings over the regular repacker with one file, but the file itself was mostly digital silence put through a braindead encoder. That file was why I originally made the -z switch in 1.04