#1 2016-03-09 10:28:00

Eric
Member
Registered: 2012-11-26
Posts: 129
Website

SynZip slow at unzipping to file

I have a .zip file of about 600 MB that unzips to a file of 3.2 GB

Using TZipRead.UnZip file overload, the unzipping takes about 77 seconds, while unzip from the Windows Shell it takes 45 seconds or less.
Also checked with 7zip, which does it in 54 seconds.

In all three cases, disk usage is at 100%, so the problem probably originates from using TFileStream, which does not buffer anything, and does not allow to set OS buffering flags.

One minimal solution would be to provide an Unzip overload where you could pass a TStream rather than a filename. This way we could pass a buffered stream, and it could also have other uses.

Offline

#2 2016-06-28 11:43:56

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,316
Website

Re: SynZip slow at unzipping to file

There is already a 64KB buffer during the uncompression.
So the output is already buffered, even for a plain TFileStream output!

I've increased the UnCompressStream() buffer to 256KB instead of 64KB to speedup UnZip(filename) process.
See http://synopse.info/fossil/info/182f8b264c

I've also added an overloaded Unzip() method with a TStream parameter.
See http://synopse.info/fossil/info/79d1db0d97

Feedback is welcome.

Offline

Board footer

Powered by FluxBB