6

I m currently using Ionic zip library. I was curious if there s a faster one than this?

As long as it has a faster compression algorithm, i dont care what it uses.

Cheeso
  • 189,189
  • 101
  • 473
  • 713
DarthVader
  • 52,984
  • 76
  • 209
  • 300
  • 1
    I hear `FileStream` is really fast. In all seriousness, you should probably care about space savings (deflation), not just speed. – Matthew Flaschen Mar 22 '11 at 00:25
  • 5
    space is cheap, time is expensive. – DarthVader Mar 22 '11 at 00:28
  • 6
    user177883: Not compressing is faster than compressing. Don't zip your files if that's too expensive. – dtb Mar 22 '11 at 00:34
  • irrelevant. that wasnt my question!!! wtf? – DarthVader Mar 22 '11 at 00:36
  • 9
    @user177883: I'm afraid your question isn't really clear. You seem to be concerned about time, but not about space. Compression trades space for time (less space ~ more time). If you want less time, don't compress. What are you trying to achieve? If you just want to put a bunch of files into a single file, what about storing them in a `.tar` file (which doesn't do compression)? – dtb Mar 22 '11 at 00:38
  • 1
    I'd be glad to help you out if you have specific performance optimization concerns regarding DotNetZip. There are ways to improve the performance of the compression, and there are ways to improve the performance of your app by avoiding compression (for example by pre-compressing some content), or you can move to a different archive format like compressed tar (tgz) if you have many small files. Some combination of those things might address your concern. I can help you here on StackOverflow, or on the forums on dotnetzip.codeplex.com. – Cheeso Mar 23 '11 at 00:23
  • cool. where do we start? I wanted to know if you are using threads? or parallels? also, I used Tasks and didnt benefit from it etc. i d like to discuss with you. – DarthVader Mar 23 '11 at 00:29
  • 2
    we start by getting specific about your requirements. You can either modify this question with some specifics, or open a new SO question, or open a discussion thread on the forums on codeplex.com. your choice. DotNetZip doesn't use parallels and does not use .NET 4.0. It does use multiple threads to compress when appropriate, according to a size heuristic. (Check the ParallelDeflateCompressionThreshold property on ZipFile. The documentation is fairly in depth.) – Cheeso Mar 23 '11 at 23:58

3 Answers3

6

Have you maybe tried ZipPackage?

Without knowing what exactly faster means (compressing large files? batches of bunches of files? complex directory structure?) it's hard to answer.

48klocs
  • 6,073
  • 3
  • 27
  • 34
5

I haven't done any speed comparisons but I've always preferred SharpZipLib. And of course it'll allow you to specify your compression level. A lower compression level will be faster.

Steve Wortham
  • 21,740
  • 5
  • 68
  • 90
3

Try http://sevenzipsharp.codeplex.com/. Or, try any zip lib and use a low compression factor.

Chris O
  • 5,017
  • 3
  • 35
  • 42