NVIDIA interview question

Writing a compression algo for a string.