Compression algorithm for Multi Element Telescope for Imaging and Spectroscopy (METIS)