Sample Header Ad - 728x90

The size of my lzma compressed file is different from one system to another using same compression ratio - why?

1 vote
0 answers
490 views
I have an lzma compressed file that I've extracted from a firmware image (via binwalk) that is X bytes uncompressed and Y bytes compressed. When I try to compress the extracted file again - without any modification and using the same compression ratio - on my machine (Ubuntu 18.04), I end up with a compressed image that is Z bytes instead of Y bytes. My guess is that is has to do with the version of lzma that I'm using vs the version that was originally used - is that correct? And if so, is there a way to tell which version of lzma was used originally? Also, the compressed file extracted from binwalk has the .7z extension, but running file orig_compressed.7z says that it's an lzma file. I'm not sure if that's making a difference. Edit: the firmware uses the MIPS architecture - I've tried using qemu-system-mipsel to run the MIPS lzma and I still got a compressed file that was a different size than what I'm expecting it to be.
Asked by compression_help1234 (11 rep)
Sep 10, 2020, 03:34 PM