AddFile truncate the entry, and Extract trow an exception "bad read of entry test/MyFile.txt from compressed archive."
Debugging step by step sometimes work fine.
My code:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim str As New String(" "c, 2490368)
IO.File.WriteAllText("C:\test\MyFile.txt", str)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Using zip As New Ionic.Zip.ZipFile
zip.AddFile("C:\test\MyFile.txt")
zip.Save("C:\test\MyZip.zip")
End Using
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Using zip As Ionic.Zip.ZipFile = Ionic.Zip.ZipFile.Read("C:\test\MyZip.zip")
For Each arch As Ionic.Zip.ZipEntry In zip
arch.Extract("C:\test\opened")
Next
End Using
End Sub
Comments: ** Comment from web user: mlavoie88 **
I also just encountered this issue. Easy to work around with the ParallelDeflate setting, but difficult to isolate the failure since it occurs only on files of a specific size. I concur with earlier comments that the impact of this bug should be higher.