Question

A requirement for a system I am writing means that I need to determine the contents of files/packages that may have been created using any one of a number of different compression/archive techniques - zip, gzip, rar, tar. The files will be located on remote systems that could be running any variant of Windows or Unix/Linux, and the files could have been created with any compression/archive technique (I'll settle on a manageable list to support).

What formats does System.IO.Packaging handle - just zip?

Third party library? That's not my preferred option - I need to support this system into the future.

Any guidance and suggestions would be very much appreciated.

Was it helpful?

Solution

System.IO.Packaging has a ZipPackage implementation that supports zip files. Any other compression formats are not supported natively and you would have to look for third party support for those.

DotNetZip also has support for zip files, but the API may be more approachable than the built in .net ZipPackage. SharpZipLib has support for a few more file formats including Tar, GZip and BZip2.

There is also the option of leveraging 7Zip and all of the formats that it supports.

There are also plenty of commercial options: XCeed, Rebex to name a couple.

There is no clear cut answer to your question and you are going to have to figure out which option is going to work best for you and determine what licensing model you want to use.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top