Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a built-in zip library in .NET 3.5?

Is there a built-in zip library in .NET 3.5?

If not, what are the popular open source .net zip libraries.

like image 266
Guy Avatar asked Feb 26 '09 23:02

Guy


People also ask

How do I create a zip file in dotnet core?

string startPath = @"c:\example\start"; string zipPath = @"c:\example\result. zip"; string extractPath = @"c:\example\extract"; ZipFile. CreateFromDirectory(startPath, zipPath); ZipFile.

What is Dotnet Zip?

DotNetZip is a FAST, FREE class library and toolset for manipulating zip files. Use VB, C# or any . NET language to easily create, extract, or update zip files. Product. Versions.


1 Answers

EDIT: See note in comments - SharpZipLib is now unmaintained, and you probably want to avoid it.

Open source: #ZipLib

I believe that the classes in the System.IO.Compression namespace are fine for compressing/decompressing a single stream of data, but there's nothing built into the framework to cope with actual zip files.

EDIT: As noted in Ants' answer, there's System.IO.Packaging.ZipPackage but it certainly looks like that's really designed for use in WPF, and wouldn't be terribly convenient to use for general zip file handling. Worth looking into though. I wasn't aware of it before though... definitely worth investigating.

like image 143
Jon Skeet Avatar answered Oct 03 '22 01:10

Jon Skeet