Skip to content

Commit

Permalink
add Mac OSX support
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimmy Xie committed Feb 22, 2019
1 parent c41bfdf commit 0307262
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Brotli.NET/Brotli.Core/Brotli.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>2.0.0.0</Version>
<Version>2.0.2.0</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageId>Brotli.NET</PackageId>
<Authors>Jinjun Xie</Authors>
Expand All @@ -12,7 +12,7 @@
<PackageProjectUrl>https://github.com/XieJJ99/brotli.net</PackageProjectUrl>
<PackageTags>Brotli Compress Decompress .NET Standard Stream</PackageTags>
<PackageReleaseNotes>Support .NET Standard 2(Windows and Linux64)</PackageReleaseNotes>
<Description>Supported on dotnet standard2, on windows and linux, provide similar interface to Google offical API.Quality and window control is supported.
<Description>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)
Expand Down
6 changes: 6 additions & 0 deletions Brotli.NET/Brotli.Core/Interop/LibPathBootStrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0307262

Please sign in to comment.