Meta interview question

compress a string