Add Compression best practices guide#52968
Conversation
rzikm
left a comment
There was a problem hiding this comment.
It's getting better, few additional comments.
There was a problem hiding this comment.
Pull request overview
Adds a new guidance article under File and stream I/O that explains how to work with ZIP and TAR archives in .NET, with a focus on API selection, safe extraction patterns, and operational considerations.
Changes:
- Adds a new best-practices article for ZIP and TAR archives, including security guidance for untrusted input.
- Adds a new C# snippet project and a consolidated
Program.cscontaining the referenced code regions. - Links the new article from
docs/fundamentals/toc.yml.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| docs/standard/io/zip-tar-best-practices.md | New best-practices guide covering API choice, trusted vs. untrusted extraction, memory/perf, platform differences, and encryption notes. |
| docs/standard/io/snippets/zip-tar-best-practices/csharp/Project.csproj | New snippet project targeting net11.0 for compiling the article snippets. |
| docs/standard/io/snippets/zip-tar-best-practices/csharp/Program.cs | Adds the C# snippet implementations referenced by the article. |
| docs/fundamentals/toc.yml | Adds a TOC entry pointing to the new best-practices article. |
|
cc also @GrabYourPitchforks and @blowdart for wording |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
MihaZupan
left a comment
There was a problem hiding this comment.
It's great we're documenting this, thank you!
It'd be good if we were also able to provide better ways of getting these things right in the first place though.
adegeo
left a comment
There was a problem hiding this comment.
I'll work on fit-and-finish work, checking xref descriptions where they make sense, maybe changing titles of sections to be actionable, that kind of work.
|
Hey @adegeo thanks for the review! I'd like the guide to be available as soon as possible. If there's anything I can help with on the fit-and-finish work you mentioned, I'm happy to take that on to speed things up. Just let me know :) |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@alinpahontu2912 I've updated the content. I'll check for any build issues and fix them if they appear. However, you still need to resolve the existing discussions. Cheers! |
|
Thanks @adegeo ! |
Summary
Add a guide explaining how to best work with Zip and Tar archives in .NET.
Internal previews