1
0
mirror of https://github.com/chylex/Brotli-Builder.git synced 2024-11-24 22:42:50 +01:00
Brotli-Builder/BrotliLib/Brotli/Parameters/BrotliFileParameters.cs

36 lines
1.2 KiB
C#

using BrotliLib.Brotli.Components;
using BrotliLib.Brotli.Dictionary;
using BrotliLib.Brotli.Dictionary.Default;
namespace BrotliLib.Brotli.Parameters{
public sealed class BrotliFileParameters{
public static BrotliFileParameters Default { get; } = new Builder().Build();
public WindowSize WindowSize { get; private set; }
public BrotliDictionary Dictionary { get; private set; }
#pragma warning disable CS8618
private BrotliFileParameters(){}
#pragma warning restore CS8618
public sealed class Builder{
public WindowSize WindowSize { get; set; } = WindowSize.Default;
public BrotliDictionary Dictionary { get; set; } = BrotliDefaultDictionary.Embedded;
public Builder(){}
public Builder(BrotliFileParameters original){
WindowSize = original.WindowSize;
Dictionary = original.Dictionary;
}
public BrotliFileParameters Build(){
return new BrotliFileParameters{
WindowSize = WindowSize,
Dictionary = Dictionary
};
}
}
}
}