RLEp

From MSX Game Library

Revision as of 23:51, 15 December 2023 by Aoineko (talk | contribs) (Created page with "The RLEp format is a variant of the RLE compression (Run-length encoding) with the particularity of having 2 bits reserved to encode a pattern type and 6 bits for its length....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The RLEp format is a variant of the RLE compression (Run-length encoding) with the particularity of having 2 bits reserved to encode a pattern type and 6 bits for its length.

Pattern types:

Val Name Desc.
[00¦Size] Default value Repeat default value X times. The default value is either 0 or the first byte of the RLEp code.
[01¦Size][value] 1 byte Repeat the next character X times.
[10¦Size][value][value] 2 bytes Repeat the next two characters X times.
[11¦Size][value][value]... Uncompress Followed by a list of non-compressed bytes of size X.