IMC Trading Interview Question

Derive this data compression technique (given hints on how to do this)