can i supply parameters with a 0 if i dont want to use any parameters? and how will i get outsz? also im dealing with namco museum remix lzss files, should i change init_chr to '\0'? (line 300 of included/lzss.c)
garan wrote:can i supply parameters with a 0 if i dont want to use any parameters? and how will i get outsz? also im dealing with namco museum remix lzss files, should i change init_chr to '\0'? (line 300 of included/lzss.c)
@garan As far as I understand you want to make a tool for decompressing the SSLZ/LZSS files of that format.
Since it's just a simple lzss with init_chr set to 0 you don't need quickbms or the lzss.c in quickbms, you can use any of the many lzss source code available for any language (as long as the settings are the same) and write your own tool in few lines.
Anyway if you want to use lzss.c from quickbms you can remove any reference/operation to "parameters" and then replacing ' ' in the two init_chr (static and lzss_init) with 0.
how should i use lzss.c? i changed the parameters, messed with init_chr and removed references to `parameters` but i dont know how i should go about compressing memory. how will i obtain `outsz` mentioned in the lzss_compress function declaration?
out is the output buffer, outsz is its size. Usually out/outsz must have the same size of the input buffer, better if slighly bigger in case the input can't be compressed. Example: