The structure is
struct rle_op { int opcode; /* One of RByteDataOp or RRunDataOp. */ int xloc; /* X starting location of this data. */ int length; /* Length of run or data array. */ union { rle_pixel *pixels; /* ByteData case. */ int run_val; /* RunData case. */ } u; };
If the opcode has the value RByteDataOp, then the u.pixels component points to an array of length pixel values. If the opcode has the value RRunDataOp, then the u.run_val component contains a pixel value that is to be repeated length times.