PeachDrawing.Text
PeachDrawing.Text.Compression.BrotliCompression
BrotliCompression.SetCompressor(Func<Stream,int,Stream>) Method
Registers compressor as the encoder used in place of the .NET runtime’s own Brotli support. It receives the destination System.IO.Stream and the Brotli quality (0-11) and returns a writable System.IO.Stream: bytes written to it are Brotli-compressed into the destination, and disposing it completes the Brotli data. It must leave the destination open; PeachDrawing.Text disposes the destination itself. Pass null to go back to the default.
public static void SetCompressor(System.Func<System.IO.Stream,int,System.IO.Stream>? compressor);
Parameters
compressor System.Func<System.IO.Stream,System.Int32,System.IO.Stream>
Remarks
Thread-safe; the last call anywhere wins, and it takes effect for the next compression.