pgm 22.7, RLE encode algorithm almost works, but isn't right yet