Compression classes

R

Robert Scheer

Hi.

I am reading about the compression classes from the .Net Framework but
have some doubts. Maybe you can help me.

What is the difference between compressing a stream and compressing a
file, if any?
The purpose of these compression classes is to work compression like
an Winarj or Winzip application does?

Regards,
Robert Scheer
 
C

cubaman

Hi.

I am reading about the compression classes from the .Net Framework but
have some doubts. Maybe you can help me.

What is the difference between compressing a stream and compressing a
file, if any?
The purpose of these compression classes is to work compression like
an Winarj or Winzip application does?

Regards,
Robert Scheer

I suggest Ionic zip library. Many features, included those missing
in .net implementation, Open source, free and very easy to use.
http://dotnetzip.codeplex.com/

Here is how to create a zip file from files in hard disc:

using (ZipFile zip = new ZipFile())
{
// add this map file into the "images" directory in the zip
archive
zip.AddFile("c:\\images\\personal\\7440-N49th.png", "images");
// add the report into a different directory in the archive
zip.AddFile("c:\\Reports\\2008-Regional-Sales-Report.pdf",
"files");
zip.AddFile("ReadMe.txt");
zip.Save("MyZipFile.zip");
}

Best regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top