Microsoft interview question

Compress a string such that the compression is reversible.