Run-length encoding (RLE) compressor and decompressor