Brotli.NET 2.0.4

.NET Standard 2.0 .NET Framework 3.5
There is a newer version of this package available.
See the version list below for details.
Install-Package Brotli.NET -Version 2.0.4
dotnet add package Brotli.NET --version 2.0.4
<PackageReference Include="Brotli.NET" Version="2.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Brotli.NET --version 2.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Brotli.NET, 2.0.4"
#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.4

// Install Brotli.NET as a Cake Tool
#tool nuget:?package=Brotli.NET&version=2.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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)
       {
                          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
               }
          }

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net35 net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (11)

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

Package Downloads
Dynamicweb.Controls

CMS Content Management System (WCMS) - Server controls.

Umbrella.Legacy.WebUtilities

This package contains a range of utility classes to aid web application development using the legacy ASP.NET stack.

TomLonghurst.AsyncRedisClient

An Asynchronous Redis Client for .NET

jfYu.Core.jfYuRequest

HttpRequest Helper

EasyCompressor.BrotliNET

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.

GitHub repositories (3)

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

Repository Stars
leiurayer/downkyi
哔哩下载姬downkyi,B站视频下载工具,支持批量下载,支持8K、HDR、杜比视界,提供工具箱(音视频提取、去水印等)。
copyliu/bililive_dm
B站直播彈幕工具
projectkudu/ARMClient
A simple command line tool to invoke the Azure Resource Manager API
Version Downloads Last updated
2.1.1 121,644 5/23/2021
2.0.4.2 437,168 3/4/2019
2.0.4 725 3/3/2019
2.0.3.2 533 3/3/2019
2.0.3.1 546 3/2/2019
2.0.3 553 3/2/2019
2.0.2 1,101 2/22/2019
2.0.0 701 2/21/2019
1.0.19 262,619 7/16/2017
1.0.17 4,649 3/23/2017
1.0.12 1,317 3/15/2017
1.0.11 2,482 12/30/2016
1.0.10 1,324 12/30/2016
1.0.9 1,309 12/30/2016
1.0.8 2,569 10/25/2016
1.0.7 1,485 10/25/2016
1.0.6 1,507 10/25/2016
1.0.5 1,497 10/24/2016
1.0.4 1,759 10/24/2016
1.0.3 1,623 10/24/2016

Now supporting .NET 3.5 and above again.