Editing Wikifang:Telefang 2 Translation Patch/NatsumeGBA compression
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 14: | Line 14: | ||
=== Mode 0: "Far" LZ77 Copy === | === Mode 0: "Far" LZ77 Copy === | ||
This is an LZ77 copy. The next 16 bits are read in with the lower 12 bits being the copy offset and the upper 4 being the copy length. The source to copy from is stored as an offset from the write head minus five. The length is stored minus | This is an LZ77 copy. The next 16 bits are read in with the lower 12 bits being the copy offset and the upper 4 being the copy length. The source to copy from is stored as an offset from the write head minus five. The length is stored minus four. That many bytes will be copied, byte by byte, from the copy location to the write head. | ||
=== Mode 1: "RLE" LZ77 Copy === | === Mode 1: "RLE" LZ77 Copy === | ||
This is another LZ77 copy. The next 8 bits are read in with the lower 2 bits being the copy offset minus one and the upper 6 being the length minus | This is another LZ77 copy. The next 8 bits are read in with the lower 2 bits being the copy offset minus one and the upper 6 being the length minus three. It works the same way as above. Most notably this command is optimized for run-length encoding - i.e., this is the reason why LZ77 is done byte-by-byte. | ||
=== Mode 2: One uncompressed byte === | === Mode 2: One uncompressed byte === |