Quantcast
Channel: SharpDevelop Community
Viewing all articles
Browse latest Browse all 1764

Added Support to TarInputStream for fast Seeking

$
0
0

I want to start by thanking everyone that put together ICSharpCode.SharpZip.  The library has been invaluable for my recent work with tar files.

One thing I did notice to be very slow was reading through a tar file to extract the file or if I was just trying to get a list of all files in the tar file.  My test file was 4.2 GB and was taking ~30 seconds to read just the very last file.  So I pulled the source to see if there was something that could be improved and I noticed seeking wasn't being used when the source stream was seekable.

I spent a few hours learning about the structure of the tar file by reviewing the current code and was able to get seeking to work.  Now the last file in the test file can be read in 225 milliseconds.  I've tested the code on about 20 files now and think all the bugs have been worked out.

Would you like to include this code in a new release?  If so, how should I get it to you? 


Viewing all articles
Browse latest Browse all 1764

Trending Articles