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

Update zip archive append example #8244

Closed
wants to merge 1 commit into from
Closed

Conversation

madelson
Copy link

I think this example should leverage ZipArchiveMode.Create because it is only appending/writing to entries. Create is more efficient in that scenario since it does not have to buffer the entire archive in memory. Furthermore, it is confusing that ZipArchiveMode.Create supports appending (unlike File.Create / FileMode.Create), so calling this nuance out in the first code example seems prudent.

See dotnet/runtime#49149

I think this example should leverage `ZipArchiveMode.Create` because it is only appending/writing to entries. `Create` is more efficient in that scenario since it does not have to buffer the entire archive in memory. Furthermore, it is confusing that `ZipArchiveMode.Create` supports appending (unlike `File.Create` / `FileMode.Create`), so calling this nuance out in the first code example seems prudent.

See dotnet/runtime#49149
@ghost
Copy link

ghost commented Jul 21, 2022

Tagging subscribers to this area: @dotnet/area-system-io-compression
See info in area-owners.md if you want to be subscribed.

Issue Details

I think this example should leverage ZipArchiveMode.Create because it is only appending/writing to entries. Create is more efficient in that scenario since it does not have to buffer the entire archive in memory. Furthermore, it is confusing that ZipArchiveMode.Create supports appending (unlike File.Create / FileMode.Create), so calling this nuance out in the first code example seems prudent.

See dotnet/runtime#49149

Author: madelson
Assignees: -
Labels:

area-System.IO.Compression

Milestone: -

@opbld32
Copy link

opbld32 commented Jul 21, 2022

Docs Build status updates of commit 90996fc:

✅ Validation status: passed

File Status Preview URL Details
snippets/csharp/System.IO.Compression/ZipArchive/CreateEntry/program1.cs ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@madelson madelson closed this Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants