RLE90
(Created page with "{{FormatInfo |formattype=electronic |subcat=Compression }} '''RLE90''' is a run-length encoding data compression scheme used in several file formats, either by itself, or ...") |
m (→Related formats) |
||
Line 26: | Line 26: | ||
== Related formats == | == Related formats == | ||
− | Among the formats that may use RLE90 are [[ARC (compression format)|ARC]] (and [[Spark]] and [[ArcFS]]), [[ | + | Among the formats that may use RLE90 are [[ARC (compression format)|ARC]] (and [[Spark]] and [[ArcFS]]), [[StuffIt]], and [[BinHex]]. |
== Links == | == Links == | ||
* [https://github.com/MacPaw/XADMaster/wiki/Rle90Algorithm Rle90Algorithm] - A brief description | * [https://github.com/MacPaw/XADMaster/wiki/Rle90Algorithm Rle90Algorithm] - A brief description | ||
* See also the [[BinHex#References|BinHex]] 4.0 specification | * See also the [[BinHex#References|BinHex]] 4.0 specification |
Latest revision as of 14:41, 21 September 2019
RLE90 is a run-length encoding data compression scheme used in several file formats, either by itself, or as part of a more sophisticated compression scheme. It is only occasionally called RLE90, but its other names, such as "Packed" and "RLE", are hopelessly vague.
The format is simple, but is more stateful than most RLE schemes, and has edge cases that can lead to problems. It uses byte value 0x90 (decimal 144) as an escape code.
[edit] Format details
To decompress:
Read the next byte(s). Follow the instructions in the first row of this table that matches. Repeat.
Byte pattern | Instructions |
---|---|
0x90 0x00 |
Emit one byte of value 0x90 |
0x90 N2 |
Emit N2−1 (additional) copies of the "previous byte" |
N1 |
Emit one byte of value N1 |
The term "previous byte" needs clarification when the previous bytes were the 0x90 0x00
escape code, or at the beginning of data where there was no previous byte. Some RLE90 variants handle these cases differently than others, by accident or design.
[edit] Related formats
Among the formats that may use RLE90 are ARC (and Spark and ArcFS), StuffIt, and BinHex.
[edit] Links
- Rle90Algorithm - A brief description
- See also the BinHex 4.0 specification