Sixel, short for "six pixels", is a bitmap graphics format supported by terminals and printers from DEC. It consists of a pattern six pixels high and one wide, resulting in 64 possible patterns. Each possible pattern is assigned an ASCII character, making the sixels easy to transmit on 7-bit serial links.
Sixel was first introduced as a way of sending bitmap graphics to DEC dot matrix printers like the LA50. After being put into "sixel mode" the following data was interpreted to directly control six of the pins in the nine-pin print head. A string of sixel characters encodes a single 6-pixel high row of the image.
The system was later re-used as a way to send bitmap data to the VT200 series terminals as a way to define custom character sets. A number of sixels were used to define each character. Starting with the VT300 series, the terminals could decode a complete sixel image to the screen, like those previously sent to printers.
Sixel encodes images by breaking up the bitmap into a series of 6-pixel high horizontal strips. Each 1-pixel-wide vertical column in a particular strip forms a single sixel. Each sixel's pixels are read as binary and encoded into a single 6-bit number, with "on" pixels encoded as a 1. This number, from 0 to 63 decimal, is then converted into a single ASCII character, offset by 63 so that an all-black sixel, 0 decimal, is encoded as ?. This ensures that the sixels remain within the printable character range of the ASCII character set. Carriage return (CR) is represented by $, and line feeds (LF) with a -; both had to be sent in turn to return the cursor to the start of the line, CRLF.