String compression is a way to compress a string. When you compress a string, the consecutive duplicate characters of the string are replaced with the number count. For example, when you compress 'aaaibbbbbbpp', it will return as 'a3i1b6p2'.