To read and write .tar and .tgz (or .tar.gz) files from .NET, you can use this one-factor tar class:
http://cheesoexamples.codeplex.com/SourceControl/changeset/view/97756#1868643
Very simple use. To create an archive:
string[] filenames = { ... }; Ionic.Tar.CreateArchive("archive.tar", filenames);
Create a compressed (gzip'd) tarball:
string[] filenames = { ... }; Ionic.Tar.CreateArchive("archive.tgz", filenames, TarOptions.Compress);
Read the tar archive:
var entries = Ionic.Tar.List("archive.tar");
Extract all entries in the tar archive:
var entries = Ionic.Tar.Extract("archive.tar");
source share