LZSS Compression: Difference between revisions
Jump to navigation
Jump to search
→Example C Decompression Function: tried to use this function and it didn't work. oops. fixed.
>Aruki mNo edit summary |
>Aruki (→Example C Decompression Function: tried to use this function and it didn't work. oops. fixed.) |
||
Line 126: | Line 126: | ||
case 1: | case 1: | ||
count = (bytes[0] >> 4) + 3; | count = (bytes[0] >> 4) + 3; | ||
length = (bytes[0] & 0xF) | bytes[1]; | length = ((bytes[0] & 0xF) << 0x8) | bytes[1]; | ||
break; | break; | ||
case 2: | case 2: | ||
count = (bytes[0] >> 4) + 2; | count = (bytes[0] >> 4) + 2; | ||
length = ((bytes[0] & 0xF) | bytes[1]) << 1; | length = (((bytes[0] & 0xF) << 0x8) | bytes[1]) << 1; | ||
break; | break; | ||
case 3: | case 3: | ||
count = (bytes[0] >> 4) + 1; | count = (bytes[0] >> 4) + 1; | ||
length = ((bytes[0] & 0xF) | bytes[1]) << 2; | length = (((bytes[0] & 0xF) << 0x8) | bytes[1]) << 2; | ||
break; | break; | ||
} | } |