Here’s a quick synopsis of the Gzip functionality in Chilkat.NET:
Chilkat.Gzip gzip = new Chilkat.Gzip();
gzip.UnlockComponent("zip unlock code"); // Use your Chilkat Zip unlock code here…
// file-to-file compression.
gzip.CompressFile("myData.dat","myData.dat.gz");
// file-to-file uncompress
gzip.UncompressFile("myData.dat.gz","myData.dat");
// uncompress to the filename stored within the .gz:
gzip.UncompressFile("myData.dat.gz","");
// file-to-memory uncompress
byte [] uncompressedData = gzip.UncompressFileToMem("myData.dat.gz");
// memory-to-file compress
gzip.CompressMemToFile(uncompressedData,"myData.dat.gz");
// memory-to-memory compression
byte [] compressedData = gzip.CompressMemory(uncompressedData);
// memory-to-memory uncompress
byte [] uncompressedData2 = gzip.UncompressMemory(compressedData);
// memory-to-file uncompress
gzip.UncompressMemToFile(compressedData ,"myData.dat");
// file-to-memory compress
byte [] compressedData2 = gzip.CompressFileToMem("myData.dat");