Brotli.NET
2.0.4.2
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
}
}
Install-Package Brotli.NET -Version 2.0.4.2
dotnet add package Brotli.NET --version 2.0.4.2
<PackageReference Include="Brotli.NET" Version="2.0.4.2" />
paket add Brotli.NET --version 2.0.4.2
#r "nuget: Brotli.NET, 2.0.4.2"
Release Notes
Now supporting .NET 3.5 and above again.
Dependencies
-
.NETFramework 3.5
- No dependencies.
-
.NETFramework 4.0
- No dependencies.
-
.NETFramework 4.5
-
.NETStandard 2.0
- No dependencies.
Used By
NuGet packages (11)
Showing the top 5 NuGet packages that depend on Brotli.NET:
Package | Downloads |
---|---|
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
|
|
JB.Toolkit
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.
|
|
JBToolkit
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.
|
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Brotli.NET:
Repository | Stars |
---|---|
projectkudu/ARMClient
A simple command line tool to invoke the Azure Resource Manager API
|
Version History
Version | Downloads | Last updated |
---|---|---|
2.0.4.2 | 219,682 | 3/4/2019 |
2.0.4 | 486 | 3/3/2019 |
2.0.3.2 | 311 | 3/3/2019 |
2.0.3.1 | 308 | 3/2/2019 |
2.0.3 | 332 | 3/2/2019 |
2.0.2 | 769 | 2/22/2019 |
2.0.0 | 443 | 2/21/2019 |
1.0.19 | 209,000 | 7/16/2017 |
1.0.17 | 3,177 | 3/23/2017 |
1.0.12 | 734 | 3/15/2017 |
1.0.11 | 1,802 | 12/30/2016 |
1.0.10 | 712 | 12/30/2016 |
1.0.9 | 713 | 12/30/2016 |
1.0.8 | 1,386 | 10/25/2016 |
1.0.7 | 887 | 10/25/2016 |
1.0.6 | 909 | 10/25/2016 |
1.0.5 | 923 | 10/24/2016 |
1.0.4 | 1,131 | 10/24/2016 |
1.0.3 | 1,006 | 10/24/2016 |