CDDAE to rip (and check quality) to .wav, then encode with lame.
Razorlame does the whole thing. The only reason i don't use razor lame to rip is because it's way slower than cddae (compare ~8x razorlame to ~22x+ on cddae). plus i don't think there is much of a loss when ripping to wav. converting to mp3s is when the sh!t hits the fan.
please feel free to correct me if i'm wrong.