Example1. Run Length Encoding for AAAABBBBBBBBBCADDDDEEFFFFFFFF Format = Character then Count (A4)
Solution: Run Length Encoding for AAAABBBBBBBBBCADDDDEEFFFFFFFF
Find consecutive letters
AAAA : A is repeated 4 times : A4
BBBBBBBBB : B is repeated 9 times : B9
C : C is repeated 1 times : C1
A : A is repeated 1 times : A1
DDDD : D is repeated 4 times : D4
EE : E is repeated 2 times : E2
FFFFFFFF : F is repeated 8 times : F8
So, AAAABBBBBBBBBCADDDDEEFFFFFFFF = A4B9C1A1D4E2F8
|