Talk:Jazz Jackrabbit RLE compression

From ModdingWiki
Jump to: navigation, search

I am not sure the description given on this page is correct; as far as I understand it, it suggests that a control byte value larger than 127 copies the next byte this value PLUS 127 times, which is thus a number between 128 + 127 and 255 + 127. In the implementation I am familiar with, a value larger than 127 means repeat the next byte value MINUS 127 times, a value between 128 -127 and 255 - 127, which makes more sense to me.

I have added the implementation I use at the bottom of the page, I think it is shorter, and though less technical, easier to understand. -Levellass