improved string compressor