simple data compression scheme on output