How to determine compression method of archive

May 3, 2012 at 11:18 PM

I'd like to determine what compression method was used on a given archive. In my case I'm more concerned with RARs. In the 7zip gui you can see the method used. I just don't see any place to access it using SevenZipSharp.

Thanks in advance.

May 7, 2012 at 4:37 AM

Looks like I solved my own issue. For those who might want the same info here's the solution.


If Common.cs :: struct ArchiveFileInfo add:

public string Method { get; set; }


Then in SevenZipExtractor.cs :: GetArchiveInfo() you need to add the following lines to "#region Getting archive items data":

_archive.GetProperty(i, ItemPropId.Method, ref data);

fileInfo.Method = NativeMethods.SafeCast(data, "");


Too bad this wasn't added by default or configurable to include.