How can I zip a file in code?

Z

zippy

In my code I create and save a file. I would like to be
able to zip that file. I've looked online and it seems
that there are no zip classes built in to .Net for C#.

How can i zip a file then? It seems there are free zip
libraries about. Is this only way?

What's a recommeded zip library to use, with easy to
follow documentation?
I've looked around and it looks like there's lots of
files to download and its not immediately clear how to go
about the simple process of zipping a file in code.

help!
 
Z

zippy

thank you Cor.

Just went to the site now.
I have downloaded "zlib compiled DLL, version 1.2.2,
zipfile format (75k)"

I saved ZLIB1.DLL to the SYSTEM file as stated in the
usage instructions.

But I don't know what i need to do now. I tried adding a
reference to the dll in my solution but i don't see it
there.

can you help? ...please :)
 
C

Cor Ligthert

Zippy,

I have used the version 1.2.1 with Zlibwapi, not this one, however I saw
there is a complete C# project in it.

Cor
 
A

AlexL [Xceed]

What's a recommeded zip library to use, with easy to
follow documentation?

Try Xceed Zip for .NET. There are other competing libraries as well,
though in some surprising cases they are not managed code (they are
..NET wrappers over old unmanaged C/C++ code) and in other cases they
are very basic components.

Xceed Zip for .NET has the most features and a beautiful (yes, I am
biased, I work for Xceed) programming object model based on making
files and folders in a zip file usable interchangeably with regular
files / folders, memory files, etc.

http://www.xceedsoft.com/products/zipnet

If your needs are not overly complex, it even allows you to zip or
unzip multiple files with one method call.

In my code I create and save a file. I would like to be
able to zip that file. I've looked online and it seems
that there are no zip classes built in to .Net for C#.

How can i zip a file then? It seems there are free zip
libraries about. Is this only way?

What's a recommeded zip library to use, with easy to
follow documentation?
I've looked around and it looks like there's lots of
files to download and its not immediately clear how to go
about the simple process of zipping a file in code.

help!

--
Alex Leblanc
Xceed Software Inc.
http://www.xceedsoft.com

Check out our advanced .NET grid and SmartUI controls

Email: (e-mail address removed) (remove the first 'x')
 

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