Rebex ZIP has high-level API for compressing/decompressing GZip archives since release 2012R2.
However, there is a separate class Rebex.IO.Compression.Gzip
to work with .GZ archives.
A sample code for zipping and unzipping *.gz files follows:
void CreateGzipArchive()
{
Gzip gz = new Gzip();
gz.Compress(@"C:\data\*.txt", TraversalMode.MatchFilesShallow, @"C:\data\archive.gz");
}
static void DecompressGzipArchive()
{
Gzip gz = new Gzip();
gz.Decompress(@"C:\data\archive.gz", @"C:\data\unzippedFiles");
}
You are right that the standard ZipArchive
class does not support .GZ - we might improve the exception message in the case when someone tried decompressing .GZ with ZipArchive so that they learn about GZip class.