Basically, one just needs to have MacPorts and the optipng port installed, and run the following command:
mdfind -0 -onlyin ~ "kMDItemContentType=public.png" | xargs -n 5 -0 optipng -preserve
[crarko adds: I haven't tested this one. Note that to use MacPorts you also need to have Xcode installed to compile the ports. If you already have MacPorts set up give this hint a try and let us know how efficient the compression is for you.]

