Added RLE encoding and decoding
Also added unit test for encoding