Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when I create a zip file to a seekable stream that contain some content,the zip content overrides the original content #244

Closed
yinyue200 opened this issue May 30, 2017 · 5 comments
Labels
Milestone

Comments

@yinyue200
Copy link

yinyue200 commented May 30, 2017

English is not my native language; please excuse typing errors.
Thanks

@adamhathcock
Copy link
Owner

I don't think I understand what you mean on this one. What do you mean "orderless stream?"

@yinyue200 yinyue200 changed the title when I create a zip file to a seekable stream that contain some content, the stream will be orderless when I create a zip file to a seekable stream that contain some content,the zip content overrides the original content May 30, 2017
@yinyue200
Copy link
Author

@adamhathcock it means zip content overrides the original content

@adamhathcock
Copy link
Owner

That sounds like a desired behavior. You might need to give me a code sample.

@yinyue200
Copy link
Author

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
Copy link
Owner

Thanks for finding this. It was a bug introduced with the Zip64 writing support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants