it's called Run Length Encoding
although it's possible to RLE optimize your image in a very lossy way so that near duplicatable colours are made identical,
however unlike the squares that appear in wavelet compression (jpeg), this optimization loss is highly noticable
( ,
Sun 30 Jan 2005, 23:25,
archived)
however unlike the squares that appear in wavelet compression (jpeg), this optimization loss is highly noticable