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

Change ZipBlocks structs to classes #113453

Merged
merged 11 commits into from
Mar 21, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions src/libraries/System.IO.Compression/System.IO.Compression.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
Microsoft Visual Studio Solution File, Format Version 12.00

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.35910.201 main
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StreamConformanceTests", "..\Common\tests\StreamConformanceTests\StreamConformanceTests.csproj", "{8E53503F-A553-410C-A285-9400625CC5E5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{6F1E1397-7610-4E99-BA7E-895ABC8E5ACB}"
Expand Down Expand Up @@ -37,11 +41,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8541C42E-9FC
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{BA616F42-6B1E-4333-9698-C39EA13AEEA2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{D61359E8-8A03-4D16-BC52-32FFE3D0974A}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{D61359E8-8A03-4D16-BC52-32FFE3D0974A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{F26573FA-11F7-4E0D-8D66-D8273C5814D6}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F26573FA-11F7-4E0D-8D66-D8273C5814D6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{29BE512B-0070-4939-8993-7B0C8B993F11}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{29BE512B-0070-4939-8993-7B0C8B993F11}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{9118055E-B74F-4FF4-AC92-FB4AF9D54CEE}"
EndProject
Expand Down Expand Up @@ -118,24 +122,28 @@ Global
GlobalSection(NestedProjects) = preSolution
{8E53503F-A553-410C-A285-9400625CC5E5} = {BB657E6F-1D06-4E7A-B4C2-B40A071A2A44}
{6F1E1397-7610-4E99-BA7E-895ABC8E5ACB} = {BB657E6F-1D06-4E7A-B4C2-B40A071A2A44}
{DDD2055F-5FB6-41CD-ABE8-6FB45F6CF44A} = {BB657E6F-1D06-4E7A-B4C2-B40A071A2A44}
{9BFD204A-0DB1-466A-9704-0E869AC8940F} = {350F6B1E-B006-4EA5-BA9E-41F57FF84FF1}
{BB89CCB0-227A-480D-B6D4-91D680278211} = {350F6B1E-B006-4EA5-BA9E-41F57FF84FF1}
{ED776381-E13D-4A0B-ACB4-74C5A784BD25} = {8541C42E-9FC4-4077-B828-720BD028F1F5}
{DDD2055F-5FB6-41CD-ABE8-6FB45F6CF44A} = {BB657E6F-1D06-4E7A-B4C2-B40A071A2A44}
{6CD1A771-F838-4F58-A174-203C02644EDE} = {BA616F42-6B1E-4333-9698-C39EA13AEEA2}
{0C920E27-5F89-42F9-AC79-2D8B886F7C1A} = {BA616F42-6B1E-4333-9698-C39EA13AEEA2}
{77B12FDD-F00D-4EA0-A802-2A0C12D0CE96} = {BA616F42-6B1E-4333-9698-C39EA13AEEA2}
{9A07A277-2896-48FC-8A20-5E290069B07D} = {BA616F42-6B1E-4333-9698-C39EA13AEEA2}
{BB89CCB0-227A-480D-B6D4-91D680278211} = {350F6B1E-B006-4EA5-BA9E-41F57FF84FF1}
{A51CB0A3-A6A1-402E-B3AF-E6293EE28FB8} = {D61359E8-8A03-4D16-BC52-32FFE3D0974A}
{FA8DBFE2-5D0E-448F-B179-9FD391F6FB5A} = {D61359E8-8A03-4D16-BC52-32FFE3D0974A}
{D61359E8-8A03-4D16-BC52-32FFE3D0974A} = {9118055E-B74F-4FF4-AC92-FB4AF9D54CEE}
{B9BCBA20-C5E1-43CF-84BE-0ACA23B69CA5} = {F26573FA-11F7-4E0D-8D66-D8273C5814D6}
{3E6E5B6B-22E9-4CCC-A476-6C59DCD321DB} = {F26573FA-11F7-4E0D-8D66-D8273C5814D6}
{F26573FA-11F7-4E0D-8D66-D8273C5814D6} = {9118055E-B74F-4FF4-AC92-FB4AF9D54CEE}
{F2ACABDD-3AFC-451D-8459-204BAC5626B3} = {29BE512B-0070-4939-8993-7B0C8B993F11}
{D61359E8-8A03-4D16-BC52-32FFE3D0974A} = {9118055E-B74F-4FF4-AC92-FB4AF9D54CEE}
{F26573FA-11F7-4E0D-8D66-D8273C5814D6} = {9118055E-B74F-4FF4-AC92-FB4AF9D54CEE}
{29BE512B-0070-4939-8993-7B0C8B993F11} = {9118055E-B74F-4FF4-AC92-FB4AF9D54CEE}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0F6F5B24-5CE5-45F2-9169-FEBEF2A3FE80}
EndGlobalSection
GlobalSection(SharedMSBuildProjectFiles) = preSolution
..\..\tools\illink\src\ILLink.Shared\ILLink.Shared.projitems*{3e6e5b6b-22e9-4ccc-a476-6c59dcd321db}*SharedItemsImports = 5
..\..\tools\illink\src\ILLink.Shared\ILLink.Shared.projitems*{fa8dbfe2-5d0e-448f-b179-9fd391f6fb5a}*SharedItemsImports = 5
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ private void ReadCentralDirectory()
while (continueReadingCentralDirectory
&& currPosition + ZipCentralDirectoryFileHeader.BlockConstantSectionSize < sizedFileBuffer.Length)
{
ZipCentralDirectoryFileHeader currentHeader = default;
ZipCentralDirectoryFileHeader currentHeader = new();

continueReadingCentralDirectory = continueReadingCentralDirectory &&
ZipCentralDirectoryFileHeader.TryReadBlock(sizedFileBuffer.Slice(currPosition), _archiveStream,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ internal void WriteCentralDirectoryFileHeader(bool forceWrite)
Debug.Assert(_fileComment.Length <= ushort.MaxValue);

// decide if we need the Zip64 extra field:
Zip64ExtraField zip64ExtraField = default;
Zip64ExtraField zip64ExtraField = new();
uint compressedSizeTruncated, uncompressedSizeTruncated, offsetOfLocalHeaderTruncated;

bool zip64Needed = false;
Expand Down Expand Up @@ -908,7 +908,7 @@ private bool WriteLocalFileHeader(bool isEmptyFile, bool forceWrite)
Debug.Assert(_storedEntryNameBytes.Length <= ushort.MaxValue);

// decide if we need the Zip64 extra field:
Zip64ExtraField zip64ExtraField = default;
Zip64ExtraField zip64ExtraField = new();
bool zip64Used = false;
uint compressedSizeTruncated, uncompressedSizeTruncated;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace System.IO.Compression
{
internal partial struct ZipGenericExtraField
internal sealed partial class ZipGenericExtraField
{
private static class FieldLengths
{
Expand All @@ -12,7 +12,7 @@ private static class FieldLengths
}
}

internal partial struct Zip64ExtraField
internal sealed partial class Zip64ExtraField
{
internal static class FieldLengths
{
Expand All @@ -23,7 +23,7 @@ internal static class FieldLengths
}
}

internal partial struct Zip64EndOfCentralDirectoryLocator
internal sealed partial class Zip64EndOfCentralDirectoryLocator
{
internal static class FieldLengths
{
Expand All @@ -34,7 +34,7 @@ internal static class FieldLengths
}
}

internal partial struct Zip64EndOfCentralDirectoryRecord
internal sealed partial class Zip64EndOfCentralDirectoryRecord
{
private static class FieldLengths
{
Expand All @@ -51,7 +51,7 @@ private static class FieldLengths
}
}

internal readonly partial struct ZipLocalFileHeader
internal sealed partial class ZipLocalFileHeader
{
internal static class FieldLengths
{
Expand All @@ -67,7 +67,7 @@ internal static class FieldLengths
public const int ExtraFieldLength = sizeof(ushort);
}

internal readonly partial struct ZipDataDescriptor
internal sealed partial class ZipDataDescriptor
{
internal static class FieldLengths
{
Expand All @@ -78,7 +78,7 @@ internal static class FieldLengths
}
}

internal readonly partial struct Zip64DataDescriptor
internal sealed partial class Zip64DataDescriptor
{
internal static class FieldLengths
{
Expand All @@ -90,7 +90,7 @@ internal static class FieldLengths
}
}

internal partial struct ZipCentralDirectoryFileHeader
internal sealed partial class ZipCentralDirectoryFileHeader
{
internal static class FieldLengths
{
Expand All @@ -114,7 +114,7 @@ internal static class FieldLengths
}
}

internal partial struct ZipEndOfCentralDirectoryBlock
internal sealed partial class ZipEndOfCentralDirectoryBlock
{
internal static class FieldLengths
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace System.IO.Compression
{
internal partial struct ZipGenericExtraField
internal sealed partial class ZipGenericExtraField
{
internal static class FieldLocations
{
Expand All @@ -13,7 +13,7 @@ internal static class FieldLocations
}
}

internal partial struct Zip64ExtraField
internal sealed partial class Zip64ExtraField
{
internal static class FieldLocations
{
Expand All @@ -26,7 +26,7 @@ internal static class FieldLocations
}
}

internal partial struct Zip64EndOfCentralDirectoryLocator
internal sealed partial class Zip64EndOfCentralDirectoryLocator
{
private static class FieldLocations
{
Expand All @@ -37,7 +37,7 @@ private static class FieldLocations
}
}

internal partial struct Zip64EndOfCentralDirectoryRecord
internal sealed partial class Zip64EndOfCentralDirectoryRecord
{
private static class FieldLocations
{
Expand All @@ -54,7 +54,7 @@ private static class FieldLocations
}
}

internal readonly partial struct ZipLocalFileHeader
internal sealed partial class ZipLocalFileHeader
{
internal static class FieldLocations
{
Expand All @@ -71,7 +71,7 @@ internal static class FieldLocations
public static readonly int DynamicData = ExtraFieldLength + FieldLengths.ExtraFieldLength;
}

internal readonly partial struct ZipDataDescriptor
internal sealed partial class ZipDataDescriptor
{
internal static class FieldLocations
{
Expand All @@ -82,7 +82,7 @@ internal static class FieldLocations
}
}

internal readonly partial struct Zip64DataDescriptor
internal sealed partial class Zip64DataDescriptor
{
internal static class FieldLocations
{
Expand All @@ -94,7 +94,7 @@ internal static class FieldLocations
}
}

internal partial struct ZipCentralDirectoryFileHeader
internal sealed partial class ZipCentralDirectoryFileHeader
{
internal static class FieldLocations
{
Expand All @@ -119,7 +119,7 @@ internal static class FieldLocations
}
}

internal partial struct ZipEndOfCentralDirectoryBlock
internal sealed partial class ZipEndOfCentralDirectoryBlock
{
private static class FieldLocations
{
Expand Down
Loading
Loading