Not exactly a mind blowing tool — but I use tools like this all the time, and none of them (as far as I can tell) have output that is as minimal as it could be. Maybe someone will find it useful.
- only encodes necessary characters
- changes attribute quotes to single quotes
- lowercases percent-encoding hex pairs
- swaps hex colors to their shorter named equivalents
- adds xlmns attribute if missing
- removes useless whitespace
If anyone spots any missing optimizations. do let me know.