C # file container

I am looking for a way to add multiple files to one file as a Zip file. I need to create a file container on the fly and add several documents, images and other important documents to the container. My criteria are that you don't need to install any additional software on your computer (preferably just a .DLL file that I can include in my project), that the software is free, and that you can encrypt data.

Does anyone know of any good container programs that support these 2 criteria, or does anyone know any good information on how to create your own container.

Patrick

+2


source to share


3 answers


Should it look like a zip file or can it be a zip file?

Are you using .NET Framework 3.0 or 3.5? If so take a look at System.IO.Packaging.ZipPackage

There is a section on this in this discussion.



In addition to DotNetZip (Microsoft Public License) that Jay Riggs talks about, SharpZipLib (GPL license). Whichever you choose, make sure the license terms match your understanding of the word "free".

If you can use ZipPackage, one of the benefits is that you don't have to think about license terms (other than those developed for any other .NET application).

EDIT: DotNetZip and SharpZipLib support encryption. I don't see what ZipPackage does, but you can take a look at System.IO.Packaging.EncryptedPackageEnvelope .

+4


source


I have used DotNetZip on a project and it worked very well. I would recommend using it. It supports encryption and is easy to use.



http://www.codeplex.com/DotNetZip

+2


source


User .Net GZipStream class (namespace System.IO.Compression.) For compressing and decompressing files. You can find more information on

I have personally used this technique to decompress a .zip file. Press here

0


source







All Articles