473,503 Members | 1,646 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Usage of zip compression in my app

My application generates a few text files. I want to use zip compression
(built in Windows XP) to compress these files in my application.
Is it possible?
Feb 12 '07 #1
6 1662
Chris <Ch***@discussions.microsoft.comwrote:
My application generates a few text files. I want to use zip compression
(built in Windows XP) to compress these files in my application.
Is it possible?
I dare say with P/Invoke you *could* use the built-in compression, but
it would almost certainly be easier to use a managed library. .NET 2.0
contains some compression APIs, and SharpZipLib is a more fully
featured one which works on 1.1:

http://www.icsharpcode.net/OpenSource/SharpZipLib/

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Feb 12 '07 #2
System.Compression supports stream compression (GZIP etc), but not the
zip format itself. #ZipLib is a popular 3rd party tool for plugging
this gap, with examples etc on the site. I have used this many times;
it is fast and fairly robust:
http://www.icsharpcode.net/OpenSource/SharpZipLib/

..Net 3.0 supposedly introduces better support; I haven't used it
myself, so can't comment on how good it is:
http://www.infoq.com/news/2007/01/CLR-3-ZIP

Marc
Feb 12 '07 #3
Hi,

"Chris" <Ch***@discussions.microsoft.comwrote in message
news:08**********************************@microsof t.com...
| My application generates a few text files. I want to use zip compression
| (built in Windows XP) to compress these files in my application.
| Is it possible?

You better use www.icsharpcode.net/OpenSource/SharpZipLib/

It's a free (with code) library for handling zip files.
--
Ignacio Machin
machin AT laceupsolutions com
Feb 12 '07 #4
Yes, it is free
But even for commercial use?
"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,

"Chris" <Ch***@discussions.microsoft.comwrote in message
news:08**********************************@microsof t.com...
| My application generates a few text files. I want to use zip compression
| (built in Windows XP) to compress these files in my application.
| Is it possible?

You better use www.icsharpcode.net/OpenSource/SharpZipLib/

It's a free (with code) library for handling zip files.
--
Ignacio Machin
machin AT laceupsolutions com
Feb 12 '07 #5
Yes, free for everything. As in "free beer".
Enjoy,
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Chris" wrote:
Yes, it is free
But even for commercial use?
"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,

"Chris" <Ch***@discussions.microsoft.comwrote in message
news:08**********************************@microsof t.com...
| My application generates a few text files. I want to use zip compression
| (built in Windows XP) to compress these files in my application.
| Is it possible?

You better use www.icsharpcode.net/OpenSource/SharpZipLib/

It's a free (with code) library for handling zip files.
--
Ignacio Machin
machin AT laceupsolutions com

Feb 12 '07 #6
Chris <Ch***@discussions.microsoft.comwrote:
Yes, it is free
But even for commercial use?
From the page linked in Ignacio's post:

"Bottom line In plain English this means you can use this library in
commercial closed-source applications."

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Feb 12 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2149
by: Brad Tilley | last post by:
I'd like to keep at least 50% of the cpu free while doing bz2 file compression. Currently, bz2 compression takes between 80 & 100 percent of the cpu and the Windows GUI becomes almost useless. How...
5
1474
by: Sandeep S. Mutalik | last post by:
Hi, Has anybody tried using compression APIs given in DB2 8.1 FP4? I would like to get more info on that. If you haven't tried it, but have some documentation about its usage, then please let me...
4
1888
by: Nick | last post by:
I have a program that generates a custom bimap every 50ms. Which is slow, but no way to make it faster. Now I want to keep it generating as fast as possible (which is 50 ms). But I have to store...
1
2336
by: chris.atlee | last post by:
I'm writing a program in python that creates tar files of a certain maximum size (to fit onto CD/DVD). One of the problems I'm running into is that when using compression, it's pretty much...
20
2896
by: chance | last post by:
Hello, I want to add compression to a memory stream and save it in an Oracle database. This is the code I have so far: //save the Word document to a binary field, MemoryStream dataStream = new...
2
1590
by: Mechul | last post by:
Hi people i need serious help here.. I have a forum and my hosting company suspended it cuz of the high usage of sql. We did everything to make lower the usage but its still high. it was ...
21
5974
by: =?Utf-8?B?VkJB?= | last post by:
I compressed a file with GZipStream class and is larger than the original file.... how can this be?, the original file is 737 KB and the "compressed" file is 1.1 MB. Did i miss something or is...
0
1260
by: Ben Neffendorf | last post by:
Hi all, I'm working on a data warehouse split into 16 partitions. Whenever we run a query that involves a non-indexed predicate, the CPU hits 100% (mainly system CPU when checked with iostat). ...
3
7500
by: GiJeet | last post by:
Hello, we have an app that scans documents into TIFF format and we need to transfer them over the internet. If anyone knows of a SDK we can use that can compress TIFFs on the fly or even if it can...
0
7271
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7319
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6979
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5570
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
373
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.