Notes

A simple way to generalize run-length encoding to two dimensions is to scan data one row after another, always finding the largest rectangle of uniform color that starts at each particular point. The pictures below show regions with an area of more than 10 cells found in this way. The presence of so many thin and overlapping regions prevents good compression.

2D run-length encoding can also be done by scanning the data according to a more complicated space-filling curve, of the kind discussed on page 893.