Skip to content

Add Compression best practices guide#52968

Merged
alinpahontu2912 merged 12 commits into
dotnet:mainfrom
alinpahontu2912:zip_tar_bestpractices
May 12, 2026
Merged

Add Compression best practices guide#52968
alinpahontu2912 merged 12 commits into
dotnet:mainfrom
alinpahontu2912:zip_tar_bestpractices

Conversation

@alinpahontu2912
Copy link
Copy Markdown
Member

@alinpahontu2912 alinpahontu2912 commented Apr 10, 2026

Summary

Add a guide explaining how to best work with Zip and Tar archives in .NET.


Internal previews

📄 File 🔗 Preview link
docs/fundamentals/toc.yml docs/fundamentals/toc
docs/standard/io/zip-tar-best-practices.md Best practices for working with ZIP and TAR archives in .NET

Comment thread docs/standard/io/zip-tar-best-practices.md
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Comment thread docs/standard/io/snippets/zip-tar-best-practices/csharp/Program.cs Outdated
Comment thread docs/standard/io/snippets/zip-tar-best-practices/csharp/Program.cs Outdated
Comment thread docs/standard/io/snippets/zip-tar-best-practices/csharp/Program.cs Outdated
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Copy link
Copy Markdown
Member

@rzikm rzikm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's getting better, few additional comments.

Comment thread docs/standard/io/snippets/zip-tar-best-practices/csharp/Program.cs
Comment thread docs/standard/io/snippets/zip-tar-best-practices/csharp/Program.cs Outdated
Comment thread docs/standard/io/snippets/zip-tar-best-practices/csharp/Program.cs Outdated
Comment thread docs/standard/io/zip-tar-best-practices.md
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
@alinpahontu2912 alinpahontu2912 requested a review from rzikm April 16, 2026 13:13
@alinpahontu2912 alinpahontu2912 marked this pull request as ready for review April 23, 2026 08:26
@alinpahontu2912 alinpahontu2912 requested a review from adegeo as a code owner April 23, 2026 08:26
Copilot AI review requested due to automatic review settings April 23, 2026 08:26
@alinpahontu2912 alinpahontu2912 requested a review from a team as a code owner April 23, 2026 08:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.cs containing 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.

Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Comment thread docs/standard/io/snippets/zip-tar-best-practices/csharp/Program.cs Outdated
Comment thread docs/standard/io/snippets/zip-tar-best-practices/csharp/Program.cs
@rzikm
Copy link
Copy Markdown
Member

rzikm commented Apr 24, 2026

cc also @GrabYourPitchforks and @blowdart for wording

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread docs/standard/io/snippets/zip-tar-best-practices/csharp/Program.cs Outdated
Copy link
Copy Markdown
Member

@MihaZupan MihaZupan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/standard/io/snippets/zip-tar-best-practices/csharp/Program.cs Outdated
Comment thread docs/standard/io/snippets/zip-tar-best-practices/csharp/Program.cs
Comment thread docs/standard/io/snippets/zip-tar-best-practices/csharp/Program.cs Outdated
Comment thread docs/standard/io/snippets/zip-tar-best-practices/csharp/Program.cs Outdated
Comment thread docs/standard/io/snippets/zip-tar-best-practices/csharp/Program.cs
Comment thread docs/standard/io/zip-tar-best-practices.md
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Comment thread docs/standard/io/zip-tar-best-practices.md
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Comment thread docs/standard/io/snippets/zip-tar-best-practices/csharp/Program.cs Outdated
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Comment thread docs/standard/io/zip-tar-best-practices.md Outdated
Copy link
Copy Markdown
Member

@svick svick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Copy link
Copy Markdown
Contributor

@adegeo adegeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@alinpahontu2912
Copy link
Copy Markdown
Member Author

alinpahontu2912 commented May 11, 2026

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 :)

@alinpahontu2912 alinpahontu2912 requested a review from adegeo May 11, 2026 12:53
@adegeo
Copy link
Copy Markdown
Contributor

adegeo commented May 11, 2026

@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!

@alinpahontu2912
Copy link
Copy Markdown
Member Author

Thanks @adegeo !

@alinpahontu2912 alinpahontu2912 merged commit 401af4f into dotnet:main May 12, 2026
9 checks passed
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.

6 participants