In each, the image data is compressed in the same format, but the graphics are compressed differently. Therefore graphics compression TYPE B was developed. The uncompressed image files consist of two bytes per pixel. 3210 Bit 7 is most significant bit. Bit 0 is least significant bit.
Image compression is based on the difference between previous and next pixels.
The compressed image data is written as a string of 8-bit bytes, according to the following scheme. A compression may be decompressed with the following algorithm. Thus all 8 graphics bits may be encoded and compressed. Graphics compression TYPE B is done as a string of 8-bit bytes, according to the following algorithm. Set pixel counter to 0.