Add CharCompress() function

Compressing string as explained in interviews.h