1
Scripting and Reverse Engineering / Having Problems with a LZS-Compression Algorithm
« on: 2007-07-11 20:51:44 »
Hi, everyone,
i'm writing a lzs-compression algorithm for Highwind at the moment, but there just a simple thing i couldnt figure out until now.
I mentioned this in my Highwind-Thread, but apparently noone who knows an answer read it, so i'll ask it here once more
By the way, my lzs-Decompression is working fine and included in Highwind.
The problem is: (My instruction was from the qhimm-wiki page for lzs-compression where i have the variable names from)
When decoding the lzs-Files i get the real_offset with this formula: real_offset = tail - ((tail - 18 - raw_offset) mod 4096)
But how do i reverse that when compressing, i've got the real_offset and want to get the raw_offset?
Maybe someone knows the answer because thats the only wrong thing in my algorithm, i've checked the compressed files.
I would be happy if you could help me,
Christian
i'm writing a lzs-compression algorithm for Highwind at the moment, but there just a simple thing i couldnt figure out until now.
I mentioned this in my Highwind-Thread, but apparently noone who knows an answer read it, so i'll ask it here once more
By the way, my lzs-Decompression is working fine and included in Highwind.
The problem is: (My instruction was from the qhimm-wiki page for lzs-compression where i have the variable names from)
When decoding the lzs-Files i get the real_offset with this formula: real_offset = tail - ((tail - 18 - raw_offset) mod 4096)
But how do i reverse that when compressing, i've got the real_offset and want to get the raw_offset?
Maybe someone knows the answer because thats the only wrong thing in my algorithm, i've checked the compressed files.
I would be happy if you could help me,
Christian