Skip to content

Conversation

@stephentoub
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings January 31, 2026 12:12
@dotnet-policy-service
Copy link
Contributor

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

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

This PR optimizes the GetLongMetadataStream method in the TAR library by reducing unnecessary array allocations when creating long metadata streams for GNU format TAR entries.

Changes:

  • Refactored GetLongMetadataStream to allocate a single byte array and write UTF-8 bytes directly into it, instead of using intermediate allocations through MemoryStream.Write() and Encoding.UTF8.GetBytes() that returns a new array

@stephentoub stephentoub merged commit 38e8e8e into dotnet:main Feb 1, 2026
94 of 98 checks passed
@stephentoub stephentoub deleted the taralloc branch February 1, 2026 04:00
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