RLE-encode the graphics data