7-Zip offers several compression options, including the dictionary size and
desired compression algorithm. I've had varying luck with the different
algorithms for varying uses.
For those times when the archive size is more important than compression
time (or for bragging rights), proposed is
a utility that tries every single
combination and only keeps the smallest output file.
I guess I could write a shell script to do a pure 7-Zip implementation in an
afternoon, so what makes this half baked? All kinds of silly algorithms could
be tried with no effect on the output--just the run time. For example, you
might try doing no compression at all (which would work nicely for empty
files). Try doing a ROT13 and then compare the output against a Klingon
dictionary. If that works out to be the smallest file, the output would include
a shell script to reverse the process.
Such a system would make final output verification that much more
important since any number of bugs could be introduced.