Microsoft Interview Question

Compress a string such that the compression is reversible.