Difference between revisions of "RLEp"

From MSX Game Library

(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....")
 
Line 5: Line 5:
 
! Val !! Name !! Desc.
 
! Val !! Name !! Desc.
 
|-
 
|-
| <tt>[00¦Size]</tt> || Default value || Repeat default value X times. The default value is either 0 or the first byte of the RLEp code.
+
| <tt>[00¦len]</tt> || Default value || Repeat default value <tt>len</tt> times. The default value is either 0 or the first byte of the RLEp code.
 
|-
 
|-
| <tt>[01¦Size][value]</tt> || 1 byte || Repeat the next character X times.
+
| <tt>[01¦len][value]</tt> || 1 byte || Repeat the next character <tt>len</tt> times.
 
|-
 
|-
| <tt>[10¦Size][value][value]</tt> || 2 bytes || Repeat the next two characters X times.
+
| <tt>[10¦len][value][value]</tt> || 2 bytes || Repeat the next two characters <tt>len</tt> times.
 
|-
 
|-
| <tt>[11¦Size][value][value]...</tt> || Uncompress || Followed by a list of non-compressed bytes of size X.
+
| <tt>[11¦len][value][value]...</tt> || Uncompress || Followed by a list of non-compressed bytes of size <tt>len</tt>.
 
|}
 
|}
  
 
[[Category:Format]]
 
[[Category:Format]]

Revision as of 23:52, 15 December 2023

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¦len] Default value Repeat default value len times. The default value is either 0 or the first byte of the RLEp code.
[01¦len][value] 1 byte Repeat the next character len times.
[10¦len][value][value] 2 bytes Repeat the next two characters len times.
[11¦len][value][value]... Uncompress Followed by a list of non-compressed bytes of size len.