Create tar.gz using .NET

2019-02-24 06:49发布

问题:

I am new to .NET. Is it possible to create a tar.gz using a .NET environment? If yes, how?

回答1:

I guess you can also use http://sevenziplib.codeplex.com/



回答2:

Have a look at SharpZipLib

http://www.icsharpcode.net/OpenSource/SharpZipLib/Download.aspx



回答3:

Yes, it is possible.

  1. Create a tar archive using a suitable library, say http://code.google.com/p/tar-cs/.
  2. Then compress the tar using GZipStream class.

Of course, you should be familiar with streams.