I found this problem isn't completely solved yet.
If two new files use a same stream, the second file content will be empty after save.
example code:
If two new files use a same stream, the second file content will be empty after save.
example code:
using (var arc = ZipArchive.Create())
{
using (var stream = new MemoryStream(Encoding.UTF8.GetBytes("qwert")))
{
arc.AddEntry("1.txt", stream, false, stream.Length, null);
arc.AddEntry("2.txt", stream, false, stream.Length, null);
arc.SaveTo(@"d:\1.zip", new CompressionInfo());
arc.SaveTo(@"d:\2.zip", new CompressionInfo());
}
}