compressing string