-
Notifications
You must be signed in to change notification settings - Fork 5k
Upgrade zlib-ng to 2.2.1 #105771
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
Merged
Merged
Upgrade zlib-ng to 2.2.1 #105771
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
dcd113e
Update to zlib-ng 2.2.1, excluding the folders:
carlossanlop 12bc7ed
Apply slide_hash and deflate patch with casts and asserts.
carlossanlop c62bc5b
Remove custom allocator.
carlossanlop e61a10e
Update Compression unit tests.
carlossanlop e060e83
cgmanifest.json, zlib-ng-version.txt, THIRD-PARTY-NOTICES.TXT updates.
carlossanlop File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
src/libraries/Common/src/System/IO/Compression/ZLibNative.CompressionLevel.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
namespace System.IO.Compression; | ||
|
||
internal static partial class ZLibNative | ||
{ | ||
/// <summary> | ||
/// <p>ZLib can accept any integer value between 0 and 9 (inclusive) as a valid compression level parameter: | ||
/// 1 gives best speed, 9 gives best compression, 0 gives no compression at all (the input data is simply copied a block at a time). | ||
/// <code>CompressionLevel.DefaultCompression</code> = -1 requests a default compromise between speed and compression | ||
/// (currently equivalent to level 6).</p> | ||
/// | ||
/// <p><strong>How to choose a compression level:</strong></p> | ||
/// | ||
/// <p>The names <code>NoCompression</code>, <code>BestSpeed</code>, <code>DefaultCompression</code>, <code>BestCompression</code> are taken over from | ||
/// the corresponding ZLib definitions, which map to our public NoCompression, Fastest, Optimal, and SmallestSize respectively.</p> | ||
/// <p><em>Optimal Compression:</em></p> | ||
/// <p><code>ZLibNative.CompressionLevel compressionLevel = ZLibNative.CompressionLevel.DefaultCompression;</code> <br /> | ||
/// <code>int windowBits = 15; // or -15 if no headers required</code> <br /> | ||
/// <code>int memLevel = 8;</code> <br /> | ||
/// <code>ZLibNative.CompressionStrategy strategy = ZLibNative.CompressionStrategy.DefaultStrategy;</code> </p> | ||
/// | ||
///<p><em>Fastest compression:</em></p> | ||
///<p><code>ZLibNative.CompressionLevel compressionLevel = ZLibNative.CompressionLevel.BestSpeed;</code> <br /> | ||
/// <code>int windowBits = 15; // or -15 if no headers required</code> <br /> | ||
/// <code>int memLevel = 8; </code> <br /> | ||
/// <code>ZLibNative.CompressionStrategy strategy = ZLibNative.CompressionStrategy.DefaultStrategy;</code> </p> | ||
/// | ||
/// <p><em>No compression (even faster, useful for data that cannot be compressed such some image formats):</em></p> | ||
/// <p><code>ZLibNative.CompressionLevel compressionLevel = ZLibNative.CompressionLevel.NoCompression;</code> <br /> | ||
/// <code>int windowBits = 15; // or -15 if no headers required</code> <br /> | ||
/// <code>int memLevel = 7;</code> <br /> | ||
/// <code>ZLibNative.CompressionStrategy strategy = ZLibNative.CompressionStrategy.DefaultStrategy;</code> </p> | ||
/// | ||
/// <p><em>Smallest Size Compression:</em></p> | ||
/// <p><code>ZLibNative.CompressionLevel compressionLevel = ZLibNative.CompressionLevel.BestCompression;</code> <br /> | ||
/// <code>int windowBits = 15; // or -15 if no headers required</code> <br /> | ||
/// <code>int memLevel = 8;</code> <br /> | ||
/// <code>ZLibNative.CompressionStrategy strategy = ZLibNative.CompressionStrategy.DefaultStrategy;</code> </p> | ||
/// </summary> | ||
public enum CompressionLevel : int | ||
{ | ||
NoCompression = 0, | ||
BestSpeed = 1, | ||
DefaultCompression = -1, | ||
BestCompression = 9 | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
v2.1.6 | ||
74253725f884e2424a0dd8ae3f69896d5377f325 | ||
v2.2.1 | ||
d54e3769be0c522015b784eca2af258b1c026107 | ||
|
||
https://github.com/zlib-ng/zlib-ng/releases/tag/2.1.6 | ||
https://github.com/zlib-ng/zlib-ng/releases/tag/2.2.1 | ||
|
||
We have removed the following folders from our local copy as these files are not needed for our compilation: | ||
|
||
- zlib-ng/docs/ | ||
- zlib-ng/doc/ | ||
- zlib-ng/test/ | ||
- zlib-ng/arch/s390/self-hosted-builder/ | ||
|
||
Apply https://github.com/dotnet/runtime/pull/105433.patch | ||
Also, if the next version does not yet contain the fixes included in 12bc7edc73308f017ec40c6b2db694a6e3490ac2, cherry-pick it as a patch. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.