This project is read-only.


Save a Spanned Zip after reading an existing ZipFile


I have an existing zip file. I would like to create a copy of this but saved using spans.
using (var someZip = ZipFile.Read(@"c:\"))
  someZip.MaxOutputSegmentSize := 65536;
The save works fine, but reading extracting the resulting spanned zip results in errors.
For example:
failed to extract entry somefile.txt -- bad state (invalid block type)
Ionic.Zlib.ZlibException: Bad state (too many length or distance symbols)
Ionic.Zlib.ZlibException: Bad state (oversubscribed dynamic bit lengths tree)
System.IO.IOException: An attempt was made to move the file pointer before the beginning of the file.
Looks like corrupted data.
I suspect this is because DotNetZip is simply copying the zipentry in its entirety, without re-calculating the offsets or the disknumbers.
Closed Jul 14, 2011 at 1:45 AM by Cheeso
fixed in changeset 80668. The first binary that will contain this fix is v1.9.1.6.