LZSS Compression: Difference between revisions
Jump to navigation
Jump to search
Adding syntax highlighting
>Aruki No edit summary |
>Aruki (Adding syntax highlighting) |
||
Line 80: | Line 80: | ||
== Example C Decompression Function == | == Example C Decompression Function == | ||
< | <syntaxhighlight lang="c">bool DecompressLZSS(char *src, unsigned long src_len, char *dst, unsigned long dst_len) | ||
{ | { | ||
char *src_end = src + src_len; | char *src_end = src + src_len; | ||
Line 181: | Line 181: | ||
// We've finished decompressing; the last thing to do is check that we've reached the end of both buffers, to verify everything has decompressed correctly. | // We've finished decompressing; the last thing to do is check that we've reached the end of both buffers, to verify everything has decompressed correctly. | ||
return ((src == src_end) && (dst == dst_end)); | return ((src == src_end) && (dst == dst_end)); | ||
}</ | }</syntaxhighlight> | ||
[[Category:File Formats]] | [[Category:File Formats]] | ||
[[Category:Donkey Kong Country: Tropical Freeze]] | [[Category:Donkey Kong Country: Tropical Freeze]] |