Compress strings