Skip to content

Add public Property for VersionMadeBy flag in zipfiles#130109

Open
alinpahontu2912 wants to merge 3 commits into
dotnet:mainfrom
alinpahontu2912:public_versionmadeby
Open

Add public Property for VersionMadeBy flag in zipfiles#130109
alinpahontu2912 wants to merge 3 commits into
dotnet:mainfrom
alinpahontu2912:public_versionmadeby

Conversation

@alinpahontu2912

Copy link
Copy Markdown
Member

Fixes #124755

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 public API on ZipArchiveEntry to expose the ZIP “version made by” field (two bytes: host platform + ZIP spec version) so callers can inspect the original metadata from the central directory.

Changes:

  • Add ZipArchiveEntry.VersionMadeBy (public ushort, [CLSCompliant(false)]) computed from the stored “made by” platform/spec fields.
  • Update the System.IO.Compression ref assembly to include the new public property.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/libraries/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs Adds the new VersionMadeBy public property and its XML documentation.
src/libraries/System.IO.Compression/ref/System.IO.Compression.cs Exposes ZipArchiveEntry.VersionMadeBy in the reference assembly surface.

Comment on lines +334 to +335
[CLSCompliant(false)]
public ushort VersionMadeBy => (ushort)(((byte)_versionMadeByPlatform << 8) | (byte)_versionMadeBySpecification);
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.

[API Proposal]: Make ZipArchiveEntry ZipVersionMadeByPlatform byte public

3 participants