Small C# .NET 2.0 class to store and extract uncompressed files in new or existing Zip files, without any external library
Introduction
There are many techniques to produce Zip files in a .NET 2.0 environment, like the following:
- Using the
java.util.zip namespace
- Invoking Shell API features
- Using a third-party .NET library
- Wrapping and marshalling a non-.NET library
- Invoking a compression tool at command-line
I have tested most of them, each one has pros and cons, but sometimes I just need a tiny library to store files in a Zip without compression, like JPEG images, that are yet inherently compressed. I have read some C++ articles about Zip creation (like this one and others), and built my own minimalistic class to create Zip packages and store files in it.
If you are looking for a true compression class, please do not disqualify this article.
Moreover, notice that the new .NET 3.0 and 3.5 Frameworks come with the ZipPackage class, but it is not available in a .NET 2.0 or Compact Framework application, and has some complex interface.
Go to the complete details ...