A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/CollapseLauncher/SevenZipExtractor below:

CollapseLauncher/SevenZipExtractor: C# wrapper for 7z.dll. Modified to work with COM Wrappers and NativeAOT Compilation on .NET 8

C# wrapper for 7z.dll (x86 and x64 included). Due to a compatibility issue with "Source Generated" COM Interop, this fork only works with .NET 8.
This fork has been modified to work with NativeAOT and ILTrimming on .NET 8. This fork also adds other features such as:

However, all the credits for the initial works have been done by the original creator: Alexander Selishchev

This fork is unfortunately still unavailable on NuGet but if you prefer one, please refer to the original version here:

Every single star makes maintainer happy! ⭐

Install-Package SevenZipExtractor
CancellationTokenSource tokenSource = new CancellationTokenSource();
using (ArchiveFile archiveFile = new ArchiveFile(@"Archive.ARJ"))
{
    archiveFile.Extract("Output", tokenSource.Token); // extract all with cancellable control using token
}
Extract to file or stream
using (ArchiveFile archiveFile = new ArchiveFile(@"Archive.ARJ"))
{
    foreach (Entry entry in archiveFile.Entries)
    {
        Console.WriteLine(entry.FileName);
        
        // extract to file
        entry.Extract(entry.FileName);
        
        // extract to stream
        MemoryStream memoryStream = new MemoryStream();
        entry.Extract(memoryStream);
    }
}
Guess archive format from files without extensions
using (ArchiveFile archiveFile = new ArchiveFile(@"c:\random-archive"))
{
    archiveFile.Extract("Output"); 
}
Guess archive format from streams
WebRequest request = WebRequest.Create ("http://www.contoso.com/file.aspx?id=12345");
HttpWebResponse response = (HttpWebResponse)request.GetResponse();

using (ArchiveFile archiveFile = new ArchiveFile(response.GetResponseStream())
{
    archiveFile.Extract("Output"); 
}

7z.dll (x86 and x64) will be added to your BIN folder automatically.

1.0.17 / 2022.04.08

1.0.16 / 2021.01.17

1.0.15 / 2020.01.14

1.0.14


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4