1

Recently I decompressed an LZMA file from a VxWorks filesystem which was recognized and decompressed by the LZMA SDK with parameters lc = lp = 0, pb = 2 and dictionary size 8MB. When I recompressed it (without modification, using the same tools and parameters) the first 332 bytes of the output were identical to that of the the original compressed data, but starting from the 333rd byte I didn't find any nontrivial match.

I could use any information regarding what the first 332 bytes could represent, why they are identical in both files while the rest are not, what parameters are most likely to be the culprit in this case or why my LZMA SDK would recreate a changed file when I used the same parameters for compression and decompression. What I want is to recreate the original LZMA exactly as it is, because I'm concerned that the firmware I got the original LZMA from might not recognize the recreated LZMA when I flash it back.

Some information that may help:

  • I was able to decompress the new output to get the same file decompressed from the original
  • The recreated LZMA is one byte smaller than the original
  • The decompressed file (call it decomp) contains some wide characters and vim recognizes its file format as dos. I compiled the LZMA tools for linux. file decomp outputs: decomp: C source, ISO-8859 text, with CRLF line terminators

Let me know of any other relevant info that I should include.

Thanks.

0 Answers0