Squid-Box.SevenZipSharp.Lite 1.6.1.23

There is a newer version of this package available.
See the version list below for details.
dotnet add package Squid-Box.SevenZipSharp.Lite --version 1.6.1.23                
NuGet\Install-Package Squid-Box.SevenZipSharp.Lite -Version 1.6.1.23                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Squid-Box.SevenZipSharp.Lite" Version="1.6.1.23" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Squid-Box.SevenZipSharp.Lite --version 1.6.1.23                
#r "nuget: Squid-Box.SevenZipSharp.Lite, 1.6.1.23"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Squid-Box.SevenZipSharp.Lite as a Cake Addin
#addin nuget:?package=Squid-Box.SevenZipSharp.Lite&version=1.6.1.23

// Install Squid-Box.SevenZipSharp.Lite as a Cake Tool
#tool nuget:?package=Squid-Box.SevenZipSharp.Lite&version=1.6.1.23                

This is a fork from tomap's fork of the original CodePlex project.

Continuous Integration

Squid-Box.SevenZipSharp Squid-Box.SevenZipSharp.Lite
NuGet Badge NuGet Badge

Changes from original project

As required by the GNU GPL 3.0 license, here's a rough list of what has changed since the original CodePlex project, including changes made in tomap's fork.

  • Target .NET version changed from .NET Framework 2.0 to .NET Standard 2.0, .NET Framework 4.7.2 and .NET Core 3.1.
  • Produces two NuGet packages, one full-feature package and a Lite variant without SFX support (and significantly smaller size).
  • Continous Integration added, both building and deploying.
  • Tests re-written to NUnit 3 test cases.
  • General code cleanup.

As well as a number of improvements and bug fixes.


Original project information below, some information might be outdated or won't apply to this fork:


Project Description

Managed 7-zip library written in C# that provides data (self-)extraction and compression (all 7-zip formats are supported). It wraps 7z.dll or any compatible one and makes use of LZMA SDK.

General

SevenZipSharp is an open source wrapper for 7-zip released under LGPL v3.0. It exploits the native 7zip dynamic link library through its COM interface and exports classes to work with various file archives. The project appeared as an improvement of http://www.codeproject.com/KB/DLL/cs_interface_7zip.aspx. It supports .NET and Windows Mobile .NET Compact.

The solution consists of SevenZipSharp library itself, console, WinForms and WPF test applications and the documentation. All are built with Microsoft Visual Studio 2008 or 2010 and under .NET 2.0 (up to 4.0). Sandcastle is used to build the library documentation. SevenZipSharp uses JetBrains ReSharper to maintain the quality of the code and NDepend to collect code statistics and audit the whole project. Special thanks to SciTech Software for .NET Memory Profiler.

Check SVN for the latest version of SevenZipSharp.

Quick start

SevenZipSharp exports three main classes - SevenZipExtractor, SevenZipCompressor and SevenZipSfx. SevenZipExtractor is a 7-zip unpacking front-end, it allows either to extract archives or LZMA-compressed byte arrays. SevenZipCompressor is a 7-zip pack ingfront-end, it allows either to compress archives or byte arrays. SevenZipSfx is a special class to create self-extracting archives. It uses the embedded sfx module by Oleg Scherbakov . LzmaEncodeStream/LzmaDecodeStream are special fully managed classes derived from Stream to store data compressed with LZMA and extract it. See SevenZipTest/Program.cs for simple code examples; SevenZipTestForms is the GUI demo application. You may find useful the SevenZipSharp documentation provided in CHM format. On Windows XP SP2 or later or Vista unblock the file to view it correctly.

Native libraries

SevenZipSharp requires a 7-zip native library to function. You can specify the path to a 7-zip dll (7z.dll, 7za.dll, etc.) in LibraryManager.cs at compile time, your app.config or via SetLibraryPath() method at runtime. <Path to SevenZipSharp.dll> + "7z.dll" is the default path. For 64-bit systems, you must use the 64-bit versions of those libraries. 7-zip ships with 7z.dll, which is used for all archive operations (usually it is "Program Files\7-Zip\7z.dll"). 7za.dll is a light version of 7z.dll, it supports only 7zip archives. You may even build your own library with formats you want from 7-zip sources. SevenZipSharp will work with them all.

Main features

  • Encryption and passwords are supported.
  • Since the 0.26 release, archive properties are supported.
  • Since the 0.28 release, multi-threading is supported.
  • Since the 0.29 release, streaming is supported.
  • Since the 0.41 release, you can specify the compression level and method.
  • Since the 0.50 release, archive volumes are supported.
  • Since the 0.51 release, archive updates are supported (0.52 - ModifyArchive). You must use the most recent 7z.dll (v>=9.04) for this feature.
  • Since the 0.61 release, Windows Mobile ARM platforms are supported.
  • Since the 0.62 release, extraction from SFX archives, as well as some other formats with embedded archives is supported.

Extraction is supported from any archive format in InArchiveFormat - such as 7-zip itself, zip, rar or cab and the format is automatically guessed by the archive signature (since the 0.43 release). You can compress streams, files or whole directories in OutArchiveFormat - 7-zip, Xz, Zip, GZip, BZip2 and Tar. Please note that GZip and BZip2 compresses only one file at a time.

SevenZipSharpMobile (SevenZipSharp for Windows Mobile) does not differ much from its big brother. See the difference table below.

Self-extracting archives

SevenZipSfx appeared in the 0.42 release. It supports custom sfx modules. The most powerful one is embedded in the assembly, the other lie in SevenZip/sfx directory. Apart from usual sfx, you can make even small installations with the help of SfxSettings scenarios. Refer to the "configuration file parameters" for the complete command list.

Advanced work with SevenZipCompressor

SevenZipCompressor.CustomParameters is a special property to set compression switches, compatible with command line switches of 7z.exe. The complete list of those switches is in 7-zip.chm of 7-Zip installation. For example, to turn on multi-threaded compression, code <SevenZipCompressor Instance>.CustomParameters.Add("mt", "on"); For the complete switches list, refer to SevenZipDoc.chm in the 7-zip installation.

Conditional compilation symbols

These compilation symbols are supported: UNMANAGED.

  • UNMANAGED allows the main COM part of SevenZipSharp to be built.
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Squid-Box.SevenZipSharp.Lite:

Package Downloads
ETWAnalyzer

Package Description

Sewer56.Update.Extractors.SevenZipSharp

SevenZipSharp integration for Sewer56.Update.

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on Squid-Box.SevenZipSharp.Lite:

Repository Stars
BeyondDimension/SteamTools
🛠「Watt Toolkit」是一个开源跨平台的多功能 Steam 工具箱。
Siemens-Healthineers/ETWAnalyzer
Command line tool to analyze one/many ETW file/s with simple queries for common issues.
Version Downloads Last updated
1.6.2.24 2,368 4/9/2024
1.6.1.23 7,511 4/4/2023
1.6.0.22 225 3/31/2023
1.5.2.21 286 3/22/2023
1.5.0.366 23,491 8/15/2021

Fixed broken asynchronous extraction.