From 9cb8f92587e9b74364974ac816391e1710dc383e Mon Sep 17 00:00:00 2001 From: IG Date: Mon, 30 Sep 2024 12:13:31 +0100 Subject: [PATCH] extra test --- docs/README.md | 4 ++-- managed/IronCompress.Test/IronTest.cs | 5 +++++ managed/IronCompress/Codec.cs | 4 ++-- managed/IronCompress/Iron.cs | 4 ++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/README.md b/docs/README.md index 71499e8..d868c59 100644 --- a/docs/README.md +++ b/docs/README.md @@ -24,8 +24,8 @@ And following architectures: | | | | ✅ | ✅ | ⛔ | x64 | | | | | ⛔ | ✅ | ✅ | ARM64 | | **Gzip** | ✅
*part of .NET* | | ⛔ | ⛔ | ⛔ | x32 | -| | | | ✅ | ✅ | ✅ | x64 | -| | | | ⛔ | ✅ | ✅ | ARM64 | +| | | | ⛔ | ⛔ | ⛔ | x64 | +| | | | ⛔ | ⛔ | ⛔ | ARM64 | | **Brotli** | ✅
*except on .NET Standard 2.0* | | ⛔ | ⛔ | ⛔ | x32 | | | | | ✅ | ✅ | ⛔ | x64 | | | | | ⛔ | ✅ | ✅ | ARM64 | diff --git a/managed/IronCompress.Test/IronTest.cs b/managed/IronCompress.Test/IronTest.cs index 5eee524..a1a39c4 100644 --- a/managed/IronCompress.Test/IronTest.cs +++ b/managed/IronCompress.Test/IronTest.cs @@ -65,4 +65,9 @@ public void EncodeDecodeManaged(Codec codec) { public void CheckNativeLibAvailable() { Assert.True(Iron.IsNativeLibraryAvailable); } + + [Fact] + public void CheckNoNativeGzip() { + Assert.False(Iron.SupportsNative(Codec.Gzip)); + } } \ No newline at end of file diff --git a/managed/IronCompress/Codec.cs b/managed/IronCompress/Codec.cs index f66d2f8..d4f13b5 100644 --- a/managed/IronCompress/Codec.cs +++ b/managed/IronCompress/Codec.cs @@ -1,12 +1,12 @@ namespace IronCompress { public enum Codec { /// - /// Google Snappy. Has managed and native implementations. + /// Google Snappy. /// Snappy = 1, /// - /// Facebook Zstandard. Native only. + /// Facebook Zstandard. /// Zstd = 2, diff --git a/managed/IronCompress/Iron.cs b/managed/IronCompress/Iron.cs index 5da0536..fc00811 100644 --- a/managed/IronCompress/Iron.cs +++ b/managed/IronCompress/Iron.cs @@ -35,7 +35,7 @@ public static bool IsNativeLibraryAvailable { } } - static bool SupportsManaged(Codec c) { + public static bool SupportsManaged(Codec c) { #if NETSTANDARD2_0 return c == Codec.Snappy || c == Codec.Gzip; #else @@ -43,7 +43,7 @@ static bool SupportsManaged(Codec c) { #endif } - static bool SupportsNative(Codec c) { + public static bool SupportsNative(Codec c) { return Native.iron_is_supported((int)c); }