Evaluation of data compression techniques for the inference of stellar atmospheric parameters from high-resolution spectra