Decompressing zip files with C#Which is the fastest way to decompress ZIP files (fragments actually) using C#?
I tried with SharpZipLib vs zlib.net vs a wrapper on top of zlib 1.2.3.
Which one is faster?
I tried with the same test file, repeating 1000 times and these are the results:
$ time mono unzip.exe file ziplib 1000
$ time mono unzip.exe file sharp 1000
$ time mono unzip.exe file zlib 1000
So, the zlib wrapper is two times faster than SharpZipLib which, in turn, is faster than zlib.net
For zlib wrapper I just called the uncompress method.
With SharpZipLib I used InflaterInputStream
InflaterInputStream st = new InflaterInputStream(file, new Inflater(true));
and for zlib.NET
zlib.ZOutputStream outZStream = new zlib.ZOutputStream(outStream);
Hope it helps!