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:\original.zip"))
someZip.MaxOutputSegmentSize := 65536;
The save works fine, but reading extracting the resulting spanned zip results in errors.
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.