Search code examples
c#zipaesdotnetzip

DotNetZip unzip throw Ionic.Zip.BadStateException


I have zipped a folder of 1.5 GB in multiple zip files of 100 MB using aes256 encryption. When I tried to unzip, after 70 - 75% of files were unzipped the error

Ionic.Zip.BadStateException

was thrown with the message "The final hash has not been computed.". Please tell me why it is happening and how can I fix this. I found the same issue here, but without a solution. Please help, thanks.


Solution

  • Well, I found a workaround, using zip.ParallelDeflateThreshold = -1; seems to fix the bug. With this, zipping is slower, but it's the only way.