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.
#r "nuget: Brotli.NET, 2.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Brotli.NET as a Cake Addin
#addin nuget:?package=Brotli.NET&version=2.0.0

// Install Brotli.NET as a Cake Tool
#tool nuget:?package=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.

NuGet packages (10)

Showing the top 5 NuGet packages that depend on Brotli.NET:

Package Downloads
This package contains a range of utility classes to aid web application development using the legacy ASP.NET stack.
An Asynchronous Redis Client for .NET
HttpRequest Helper
A collection of useful classes, extensions and tools written in C# to aid in a wide variety of development. With components for ASP Net MVC, Winform and Console applications. Integrations for Google, AD and SQL and pre-written implementations / helpers for a variety of tasks... Just Because.
Brotli offers up to 30% more compression than gzip. This is a simple bundle with Brotli compression with fallback to gzip and deflate

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on Brotli.NET:

Repository Stars
A simple command line tool to invoke the Azure Resource Manager API
⚡ A compression library that implements many compression algorithms such as LZ4, Zstd, LZMA, Snappy, Brotli, GZip, and Deflate. It helps you to improve performance by reducing Memory Usage and Network Traffic for caching.

Version History

Version Downloads Last updated 254,904 3/4/2019
2.0.4 540 3/3/2019 345 3/3/2019 357 3/2/2019
2.0.3 375 3/2/2019
2.0.2 811 2/22/2019
2.0.0 482 2/21/2019
1.0.19 217,727 7/16/2017
1.0.17 3,338 3/23/2017
1.0.12 773 3/15/2017
1.0.11 1,879 12/30/2016
1.0.10 755 12/30/2016
1.0.9 767 12/30/2016
1.0.8 1,440 10/25/2016
1.0.7 927 10/25/2016
1.0.6 951 10/25/2016
1.0.5 963 10/24/2016
1.0.4 1,167 10/24/2016
1.0.3 1,043 10/24/2016
Show less