Xceed .NET Libraries Documentation
Unzip method

Welcome to Xceed .NET, .NET Standard and Xamarin Libraries! > Basic Concepts > The Quick classes > Quick classes versus FileSystem > Unzip method

Xceed Zip for .NET gives you the possibility to unzip files and folders from a zip file. For more information, you can refer to the Extracting files from a zip file and Extracting items from a zip file topics.

QuickZip Example

The following example demonstrates how to unzip the contents of a zip file using the static Unzip method of the QuickZip class.

C# Copy Code

using Xceed.Zip;
using Xceed.Sfx;

QuickZip.Unzip( "d:\\test.zip", "d:\\", true, true, false, "*" );

FileSystem Example

The following example demonstrates how to unzip the contents of a zip file using the FileSystem object model.

VB.NET Copy Code

Imports Xceed.Zip
Imports Xceed.FileSystem

Dim zip As New ZipArcive( New DiskFile( "c:\test.zip" ) )
Dim folder As New DiskFolder( "c:\temp" )

zip.CopyFilesTo( folder, True, True )

C# Copy Code

using Xceed.Zip;
using Xceed.FileSystem;

ZipArchive zip = new ZipArchive( new DiskFile( "c:\\test.zip" ) );
DiskFolder folder = new DiskFolder( "c:\\temp" );

zip.CopyFilesTo( folder, true, true );

For more information, you can refer to the Extracting files from a zip file and Extracting items from a zip file topics.