Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

7zip

lzma

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?

like image 718
Carles Sala Avatar asked Oct 16 '12 15:10

Carles Sala


1 Answers

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

like image 57
Carles Sala Avatar answered Oct 04 '22 20:10

Carles Sala