Brotli.NET 2.0.0

Supported on dotnet standard2, on windows and linux, 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)
       {
                          var app = Context.ApplicationInstance;
               String acceptEncodings = app.Request.Headers.Get("Accept-Encoding");

               if (!String.IsNullOrEmpty(acceptEncodings))
               {
                   System.IO.Stream baseStream = app.Response.Filter;
                   acceptEncodings = acceptEncodings.ToLower();

                   if (acceptEncodings.Contains("br") || acceptEncodings.Contains("brotli"))
                   {
                       app.Response.Filter = new BrotliStream(baseStream, System.IO.Compression.CompressionMode.Compress);
                       app.Response.AppendHeader("Content-Encoding", "br");
                   }
                   //other encodings
               }
          }

There is a newer version of this package available.
See the version list below for details.
Install-Package Brotli.NET -Version 2.0.0
dotnet add package Brotli.NET --version 2.0.0
<PackageReference Include="Brotli.NET" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Brotli.NET --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

Support .NET Standard 2(Windows and Linux64)

  • .NETStandard 2.0

    • No dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.0.4.2 5,045 3/4/2019
2.0.4 141 3/3/2019
2.0.3.2 97 3/3/2019
2.0.3.1 91 3/2/2019
2.0.3 103 3/2/2019
2.0.2 536 2/22/2019
2.0.0 191 2/21/2019
1.0.19 80,490 7/16/2017
1.0.17 2,282 3/23/2017
1.0.12 399 3/15/2017
1.0.11 1,306 12/30/2016
1.0.10 368 12/30/2016
1.0.9 378 12/30/2016
1.0.8 826 10/25/2016
1.0.7 372 10/25/2016
1.0.6 386 10/25/2016
1.0.5 396 10/24/2016
1.0.4 466 10/24/2016
1.0.3 456 10/24/2016
Show less