Visual C# coding for Zip / Unzip a folder

The high featured Visual C# provide options to create a custom zipper to achieve Zip and Unzip operation as we required many people may know about this options that present in System.IO.Compression library of Microsoft but this gallery help you to custom coding for the same.

The System.IO.Compression namespace contains classes that provide basic compression and decompression services for streams. Also System.IO.Compression class come with some usable interface that you help us to create more effective custom compressor Zipper as per our desire.

In this System.IO.Compression we can define our format / Extension like “.zip” or “.abc” or “.zipped” likewise as per our desire format. Also this class help us to quick way to Zip a folder or file and Collection of folder and collection of file as well.

Here the attached sample provide you a glance that may be a basic example to zip ad unzip a Folder with a Simple UI. In this sample there is two module, Zip and Unzip what will help us to zip (to our desire format or Extension) a folder from a location and placed it to our desire location and get a zip (or our custom format / extension) to extract in a required location respectively

The System.IO.Compression available with following classes.

DeflateStream

Provides methods and properties for compressing and decompressing streams by using the Deflate algorithm.

GZipStream

Provides methods and properties used to compress and decompress streams.

ZipArchive

Represents a package of compressed files in the zip archive format.

ZipArchiveEntry

Represents a compressed file within a zip archive.

ZipFile

Provides static methods for creating, extracting, and opening zip archives.

ZipFileExtensions

Provides extension methods for the ZipArchive and ZipArchiveEntry classes.