ZipArchive gives Unexpected end of data corrupted error
Move zipStream.ToArray() outside of the zipArchive using. The reason for your problem is that the stream is buffered. There’s a few ways to deal wtih it: You can set the stream’s AutoFlush property to true. You can manually call .Flush() on the stream. Or, since it’s MemoryStream and you’re using .ToArray(), you can simply allow … Read more