mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-13 21:22:22 +00:00
when I create a zip file to a seekable stream that contain some content,the zip content overrides the original content #187
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yinyue200 on GitHub (May 30, 2017).
English is not my native language; please excuse typing errors.
Thanks
@adamhathcock commented on GitHub (May 30, 2017):
I don't think I understand what you mean on this one. What do you mean "orderless stream?"
@yinyue200 commented on GitHub (May 30, 2017):
@adamhathcock it means zip content overrides the original content
@adamhathcock commented on GitHub (May 30, 2017):
That sounds like a desired behavior. You might need to give me a code sample.
@yinyue200 commented on GitHub (May 31, 2017):
using (var file = System.IO.File.Create("D:\\a.zip")) { var bt=System.Text.Encoding.UTF8.GetBytes("https://github.com/adamhathcock/sharpcompress/issues/244"); file.Write(bt,0,bt.Length); using (var zw = new SharpCompress.Writers.Zip.ZipWriter(file, new SharpCompress.Writers.Zip.ZipWriterOptions(SharpCompress.Common.CompressionType.Deflate))) { zw.WriteToStream("a",new SharpCompress.Writers.Zip.ZipWriterEntryOptions()).Dispose(); } }And the file will not start with the URL.
@adamhathcock
@adamhathcock commented on GitHub (May 31, 2017):
Thanks for finding this. It was a bug introduced with the Zip64 writing support.