I have a line of bits, 104 bytes wide. It might contain anything between 000.......000 to 010101.....0101 to 11111.....11111 I had thought of a simple RLE encoding, where 1XXXXXXX means X+1 pixels of black, and 0XXXXXXX means X+1 pixels of white, but in the case of 010101 sorts of data, it fails rather badly at compression! I also thought about compressing the data, and if the "compressed" version was longer than the uncompressed, to abort and send raw. However, it seems to me that there has to be something out there that's simple to work with, yet works better than my little hare-brained scheme. What say the group? -- Dave's Engineering Page: http://www.dvanhorn.org Got a need to read Bar codes? http://www.barcodechip.com Bi-directional read of UPC-A, UPC-E, EAN-8, EAN-13, JAN, and Bookland, with two or five digit supplemental codes, in an 8 pin chip, with NO external parts. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics