The automation of rail track inspection addresses key issues in railway transportation, notably reducing maintenance costs and improving safety. However, it presents numerous technical challenges, including sensor selection, calibration, data acquisition, defect detection, and storage. This paper introduces a compression method tailored for laser triangulation scanners, which are crucial for scanning the entire rail track, including the rails, rail fasteners, sleepers, and ballast, and capturing rail profiles for geometry measurement. The compression technique capitalizes on the regularity of rail track data and the sensors’ limited measurement range and resolution. By transforming scans, they can be stored using widely available image compression formats, such as PNG. This method achieved a compression ratio of 7.5 for rail scans used in the rail geometry computation and maintained rail gauge reproducibility. For the scans employed in defect detection, a compression ratio of 5.6 was attained without visibly compromising the scan quality. Lossless compression resulted in compression ratios of 5.1 for the rail geometry computation scans and 3.8 for the rail track inspection scans.