-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
138 changed files
with
3,589 additions
and
2,162 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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 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 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 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 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.