Here is example
I think reset them only affect new files.
Old files always
test code
if new added, second and third time will output empty string.
using (var arc = ZipArchive.Create())
{
string str = "test.txt";
var source = new MemoryStream(Encoding.UTF8.GetBytes(str));
arc.AddEntry("test.txt", source, true, source.Length, null);
arc.SaveTo(@"D:\a.zip", new CompressionInfo());
arc.SaveTo(@"D:\b.zip", new CompressionInfo());
}
test.txt in b.zip will be empty.I think reset them only affect new files.
Old files always
reset
each time I call OpenEntryStream (or create a new stream? I didn't view so much code).test code
var entry = arc.Entries.where(v => v.FilePath == "exist.txt");
Console.WriteLine(new StreamReader(entry.OpenEntryStream()).ReadToEnd());
Console.WriteLine(new StreamReader(entry.OpenEntryStream()).ReadToEnd());
Console.WriteLine(new StreamReader(entry.OpenEntryStream()).ReadToEnd());
if file is exist before open, the output of second and third time are same as first time.if new added, second and third time will output empty string.