extracting compress_CM6 function