I went through this when I started re-organizing my library after getting into the whole head-fi thing. I also had the issue of (portable!) storage space vs. sound quality. I did a bunch of listening and in the end I went with this:
-- I'm using XLD for everything ripping & transcoding because it gives you way more control over every aspect than iTunes ever will, and I don't see how the quality will be any -less- since it uses the same OS libraries as iTunes for everything they both offer (AAC, ALAC) And it can dump the result straight into iTunes (just as if you were using iTunes' internal ripper/encoder).
Its ripper has advanced modes, incl. checking with a rip database (and btw. the "confidence" number you get in the log is the number of other rips in the database, took me a while to dig that up) It converts FLAC files extremely fast (at least on an SSD) It allows for album FLAC + cue sheet to be converted into song-by-song in any format. It can down-convert HQ FLAC files (24/192) to iPod compatible 24/48 ALAC very quickly, and most conveniently it supports Profiles, so you can make your own into a dropdown list ("Best lossy", "Original Lossless", "iPod Lossless" etc.) It also allows for file/folder formatting since I do not ever want iTunes to "manage" my carefully curated library... I just use it as a player, pointing at said library, and to copy things on my iDevices.
And if I ever tire of Apple, my whole music library is completely independent, I could use any other player (iBasso...) or software on Windows or Linux point at my master folder and I would have the whole thing up and running in no time. (Apple officially released the ALAC spec, not that it wasn't already completely reverse-engineered anyway, so it won't become unusable anytime soon)
-- My overall strategy is to use the best lossy format possible for most albums, and only use lossless for albums dear to my heart or very refined (classical, acoustic jazz) To be honest mostly for archival purposes because even on my current rig I can barely discern a difference between both, and only on certain tracks, if I really focus on it (which is not particularly enjoyable, which in turn is really the reason for all this in the first place - enjoy music)
-- As far as "best lossy" goes, my conclusion was to go with MP3 because it is more universally usable (i.e. independent of Apple) and from reading up on the subject, at -high- bitrates not inferior to AAC in any way. More importantly, the most widely used encoder, LAME, is in active development by enthusiastic people working to improve it continuously. I don't get that impression from Apple, they seem to be more focused on vending machine features these days than sound quality (ex.: the worsening SoundCheck debacle for example...)
Also there are more options available, all accessible within XLD. I went with the best possible variable bitrate setting, VBR0, said to be identical to CBR320 except by leaving out the unused bits yields a smaller filesize. (i.e. technically it is a smidgeon better than 256kbps VBR on either AAC or MP3) I did quite a bit af A/B(X) listening between a number of tracks in various genres, and I could NOT tell the difference between those two (VBR0 & CBR320) for any track -even once-, and I think my setup is decent enough that I should be able to.
Filesize-wise, lossless compression yields on average half the size of an uncompressed album, and VBR0 yields on average about 1/3 the size of a lossless album. That trade-off is ultimately the one that works for me for the looooong run (so many albums to re-rip
)
UPDATE: Regarding MAX on OSX: I used it for a long time, love it but since it is no longer in active development, XLD does everything it does but better. I think I only ever once came across a format that XLD had trouble with, but MAX was OK so I still keep it around for such cases)