摘要 |
The invention implements a run-length file format with improved space-saving qualities. The file starts with a header in ASCII format and includes information such as the file format, maximum X and Y values, and a color palette. The binary raster data include at least one byte for each pixel run to indicate the color selected from the color palette and the run length. Concatenation flags demarcate groups of bytes. According to a first embodiment, each run is indicated by a variable-length sequence of bytes with the color in a fixed-length field and the repeat number in a variable-length field. According to a second embodiment, the color and run length are given in separate byte strings, each having a variable length. The file also includes line offset pointers to permit navigation of the file without decompressing it and thus to facilitate operations such as panning and zooming.
|