diff --git a/Brotli.NET/Brotli.Core/Brotli.Core.csproj b/Brotli.NET/Brotli.Core/Brotli.Core.csproj index 6b6ae85..22895f4 100644 --- a/Brotli.NET/Brotli.Core/Brotli.Core.csproj +++ b/Brotli.NET/Brotli.Core/Brotli.Core.csproj @@ -2,7 +2,7 @@ netstandard2.0 - 2.0.0.0 + 2.0.2.0 true Brotli.NET Jinjun Xie @@ -12,7 +12,7 @@ https://github.com/XieJJ99/brotli.net Brotli Compress Decompress .NET Standard Stream Support .NET Standard 2(Windows and Linux64) - Supported on dotnet standard2, on windows and linux, provide similar interface to Google offical API.Quality and window control is supported. + Supported on dotnet standard2(Windows/Linux/OSX), provide similar interface to Google offical API.Quality and window control is supported. The library use the native runtime and its performance should be better than System.IO.Compress.BrotliStream. To support dynamic compress in web applications,add the code like this in the Global.asax.cs: protected void Application_PostAcquireRequestState(object sender, EventArgs e) diff --git a/Brotli.NET/Brotli.Core/Interop/LibPathBootStrapper.cs b/Brotli.NET/Brotli.Core/Interop/LibPathBootStrapper.cs index 3ba2f4f..46aca8f 100644 --- a/Brotli.NET/Brotli.Core/Interop/LibPathBootStrapper.cs +++ b/Brotli.NET/Brotli.Core/Interop/LibPathBootStrapper.cs @@ -35,6 +35,12 @@ static LibPathBootStrapper() { fileName = "brolib_x86.so"; } + } else if (NativeLibraryLoader.IsMacOSX) + { + if (NativeLibraryLoader.Is64Bit) + { + fileName = "brolib_x64.dylib"; + } } if (string.IsNullOrEmpty(fileName)) throw new NotSupportedException($"OS not supported:{Environment.OSVersion.ToString()}"); var paths = NativeLibraryLoader.GetPossibleRuntimeDirectories(); diff --git a/Brotli.NET/Brotli.Core/runtimes/osx/native/brolib_x64.dylib b/Brotli.NET/Brotli.Core/runtimes/osx/native/brolib_x64.dylib new file mode 100644 index 0000000..0efd052 Binary files /dev/null and b/Brotli.NET/Brotli.Core/runtimes/osx/native/brolib_x64.dylib differ diff --git a/README.md b/README.md index 3f1056e..437b3ba 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Quality and window control is supported. Supported on: - Dotnet standard 2(.NET Framework [v4.6.1] and .net core [2] above) -- Windows and Linux +- Windows/Linux/MacOSX Besides quality controll,the library use the native runtime and its performance should be better than System.IO.Compress.BrotliStream. ## Supporting platform: .NET Standard 2(Windows/Linux)