BrotliSharpLib icon indicating copy to clipboard operation
BrotliSharpLib copied to clipboard

Possible performance issues on .NET 9.0

Open tigrouind opened this issue 5 months ago • 0 comments

I call Brotli.CompressBuffer(memory, 0, memory.Length) on .NET 9.0 to compress an array of bytes and it's very slow : each call will take 100ms in average (compared to 1-2ms for DeflateStream).

The memory buffer I try to compress is 640 KB (this is not that big). I need to compress each buffer individually (so I can't create an instance of BrotliEncoder and call Compress() each iteration).

EDIT : it's probably due to default encoder settings which might be quite high.

tigrouind avatar Nov 11 '25 22:11 tigrouind