You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
767 B

  1. using Microsoft.Extensions.Options;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Threading.Tasks;
  6. namespace Brotli.CompressionProvider.Sample
  7. {
  8. public class BrotliOption : IOptions<BrotliOption>
  9. {
  10. public BrotliOption()
  11. {
  12. }
  13. public BrotliOption(uint quality,uint window)
  14. {
  15. Quality = quality;
  16. Window = window;
  17. }
  18. /// <summary>
  19. /// Set the compress quality(0~11)
  20. /// </summary>
  21. public uint Quality { get; set; } = 5;
  22. /// <summary>
  23. /// Set the compress LGWin(10~24)
  24. /// </summary>
  25. public uint Window { get; set; } = 22;
  26. BrotliOption IOptions<BrotliOption>.Value => this;
  27. }
  28. }