I want to decompress .7z-Files that I'm downloading from a Webserver. I already searched for a Solution but I only found somewhere I have to have 7zip installed.
Is there a simple way to decompress this files?
I already have a "foreach" that loops through items in a list containing the filenames.
I personally had a good experience with the SevenZipSharp library. https://sevenzipsharp.codeplex.com/
Code example for extracting / decompressing:
using (var tmp = new SevenZipExtractor(@"d:\Temp\7z465_extra.7z"))
{
for (int i = 0; i < tmp.ArchiveFileData.Count; i++)
{
tmp.ExtractFiles(@"d:\Temp\Result\", tmp.ArchiveFileData[i].Index);
}
}
Just place the needed dll's from 7zip and this library in your programm folder and you're good to go. Therefore, you don't explicitly need 7zip to be installed, you just need the libs.