Compress the string