Run-length compression method according i.e. continuously repeated character string is one method of coding, for example:
1 str = "aaabbbccddeefff"
After the strokes compression algorithm results:
1 str = "a3b3c2d2e2f3"
Obviously this method if the processing successively repeated strings better effect, the worst case is not a continuous character, so no addition is not compressed, but also increases the length of the string.