Editing Wikifang:Telefang 2 Translation Patch/NatsumeGBA compression

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

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 three. That many bytes will be copied, byte by byte, from the copy location to the write head.
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 two. 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.
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 ===
Please note that all contributions to Wikifang are considered to be released under the Attribution-NonCommercial-ShareAlike 3.0 Unported (see Wikifang:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)