LZSS Compression: Difference between revisions

Adding syntax highlighting
>Aruki
No edit summary
>Aruki
(Adding syntax highlighting)
Line 80: Line 80:
== Example C Decompression Function ==
== Example C Decompression Function ==


<pre>bool DecompressLZSS(char *src, unsigned long src_len, char *dst, unsigned long dst_len)
<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));
}</pre>
}</syntaxhighlight>


[[Category:File Formats]]
[[Category:File Formats]]
[[Category:Donkey Kong Country: Tropical Freeze]]
[[Category:Donkey Kong Country: Tropical Freeze]]
Anonymous user