The best method for compressing a file is simply using a good codec and having experience.
A good video encoder is like a dog who talks...rare. ( Yes I admit it, I watched some blackadder a day or two ago :p )
All the information is out there if you have google, I recommend reading doom9s encoding guides for general reference and using x264 as your codec of choice, you will get sick sick compression if you it correctly ( 300-400meg file per hour of video at good quality ).
You need to use a lot of trial and error also.
Divx is one of the easier codecs to use and a good guide can be found here:
http://www.doom9.org/index.html?/gknot-main3.htmx264 ( a free implementation of the H.264 codec spec that many digital TV chans are swapping to ) is probably the best out there for size/quality at a free price, but is a little tougher to get running with and doing good quality encodes.