I use an open source software program from Japan, XLD. It supports cd extraction and transcoding of files from disk.
XLD is very flexible and fast and includes the FFMPEG FLAC codecs. Roon Core uses the native codecs with FFMPEG codecs filling any gaps. On Linux, all codecs are from the FFMPEG library (one of the dependencies)
I use FLAC (free lossless audio codec) but ALAC (Apple Lossless Audio Codec). Either one will give you the original bits back. You can verify this using a DAW. How do they do this? They encode the music using their particular method. They also include the residuals between the reconstructed encoded version and the original. The residuals are compressed using regular data compression. The audio is reconstructed and the residual is applied returning the original sample time series.
FLAC - Using FLAC (using FLAC on various platforms)
FLAC and ALAC have somewhat different priorities. FLAC is designed for easy (fast) reconstruction by modest integer-only processors. FLAC is intended to support archival lossless storage of media. On modern M1 Apple Silicon, FLAC encoding is also scary fast.
iOS currently includes the FLAC codecs. It is unclear if Apple put them in MacOS. It is likely that they did.
Either ALAC or FLAC returns the original bits. They are “bit-perfect” to use a term of art.
Please do not change the sampling rate or word size! Mark and Jamie at Present Day Productions explain in this video.
Since 44.1 and 48 kHz are not related by an integer (are not harmonically related), changing to 48 kHz or any multiple discards the samples in the 44.1 master and replaces them with approximated samples. Mark shows how sample rate conversion introduces ultrasonic distortion to which some amplifiers react very badly.
Mark and Jamie make a pretty light but faithful presentation of this bit of engineering science. And they show you the damage of oversampling. They do explain non-linear plugins and use of higher sampling rates with them but that is for pro audio engineers and has already been done when the record was mixed. Absolutely nothing to be gained by up-sampling a finished recording for Roon – it’s maths and science.
Commercial CD encoders have some advantages over XLD including use of licensed track metadata libraries, easy completion or correction of metadata, finding missing album artwork, etc. Roon also does a lot of these things for you when it puts a track in the library.
Commercial rippers may be better at allowing you to tag alternate versions of a track, say Money from Dark Side of the Moon. I have this on Japanese reissue vinyl and on CD. I digitized the LP using a Parasound Phono USB interface. So I have two to tell apart.