What's the difference between 7z and lzma compressors?
Asked Answered
D

1

16

7-Zip claims using LZMA as the compression algorithm. However, the LZMA SDK comes with two executables, 7zr.exe and lzma.exe, which have different options/switches and which produce different results which are not interchangeble, even though they are closely sized.

So the question is: What's the difference between these two processors?

Decrepitude answered 16/10, 2012 at 15:51 Comment(0)
D
23

I ended up recieving a response to a similar question directly from Igor Pavlov in the 7-Zip forums, in SourceForge, so I thought that the response might be useful to others if I reproduce it here.

1) .lzma file format uses simple header, it supports only LZMA method, and it supports only one file per archive. It doesn't store file name.

2) .7z file format uses complex headers, it supports different methods (including LZMA), and it supports big number of files in archive.

  • lzma.exe works only with .lzma files
  • 7zr.exe supports .7z files and .lzma files.

lzma.exe and 7z.exe use different default settings for LZMA (dictionary size and other). So you see the difference in compression ratio. If you set same settings for LZMA, the difference will be smaller.

Igor Pavlov in Sourceforge forums

Decrepitude answered 17/10, 2012 at 16:30 Comment(3)
interesting that you mention lzma does one file, maybe lzma is sometimes used to compress tar files.. (since a tar as opposed to a tarball, a tar, is a bunch of files not compressed but put into one file) packages.openknapsack.org/openssl/…Valencia
@Valencia I think that you might be confusing some terms there. "tar" is the software which produces the "tarballs", which are single files that contain multiple other files inside and are commonly given the ".tar" extension. That's why the file you linked is compressed using lzma, because it's a single file. You can check it here: en.wikipedia.org/wiki/Tar_(computing)Decrepitude
ah thanks, I was getting confused by the term tarball.. and .tar and tar.gz .tar being archived but not compressed.. and tarball being I guess .tar* any tar file compressed or not.Valencia

© 2022 - 2024 — McMap. All rights reserved.