Xceed .NET Libraries Documentation
QuickGZip class

Welcome to Xceed .NET, .NET Standard and Xamarin Libraries! > Basic Concepts > The Quick classes > QuickGZip class

This topic briefly presents some of the simpler overloads of the static methods of the QuickGZip class; for a complete list, see the class's methods in the reference documentation. Also, see the appropriate topics under Task-Based Help for more complete examples.

QuickGZip is not currently available in Xceed's Compact Framework products.

The methods

Only the simpler overloads are presented here. Other overloads let you specify whether to replace existing files, and use events.

The GZip method lets you compress a file. The following provides the name of the gzip-compressed file and the file to compress. 

VB.NET Copy Code
QuickGZip.GZip("d:\test.gz", "d:\test\test.txt")               
C# Copy Code
QuickGZip.GZip(@"d:\test.gz", @"d:\test\test.txt");                   

The Ungzip method lets you extract a file from a gzipped file. 

VB.NET Copy Code
QuickGZip.Ungzip("d:\test.gz", "d:\", "\test.txt")               
C# Copy Code
QuickGZip.Ungzip(@"d:\test.gz", @"d:\", @"\test.txt");                   

The GetGZipContents method returns a QuickGZipItem object. 

VB.NET Copy Code
Dim item As QuickGZipItem = QuickGZip.GetGZipContents("d:\test.gz") 
C# Copy Code
QuickGZipItem item = QuickGZip.GetGZipContents(@"d:\test.gz");

Finally, the Remove method removes an item from a gzipped file. 

VB.NET Copy Code
QuickGZip.Remove("d:\test.gz", "test.txt")
C# Copy Code
QuickGZip.Remove(@"d:\test.gz", "test.txt");