The current leading industry standard in quality and compression is H.264, also called MPEG-4 AVC. Here is a performance review of various H.264 codecs. Like any codec, the end result is a combination of the quality of the source material and the settings used by the encoder... and to a lesser extent the settings used by the decoder as well. The best results will be achieved by adjusting the encoder settings on a case by case basis. Most people don't have this kind of free time so they start with the default settings and experiment until they find the settings that meet their needs.
There are a number of good dvd rippers. Handbrake, already mentioned is one of them. Depending on the distro your are using most dvd rippers will be found in the "dirty" repositories, meaning their use is legally questionable so they are kept separate from mainstream apps. You'll also find many codecs in addition to H.264 in those repositories. Make no mistake a DVD ripper is a clear violation of the DCMA. It circumvents a copyright protection mechanism. Creating or possessing one exposes you to the possibility of civil suits or even criminal charges. (Even outside the US)
Personally I find the DCMA draconian and a violation of civil liberies but until it is either repealed or struck down I would use caution.