params.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package brotli
  2. /* Copyright 2017 Google Inc. All Rights Reserved.
  3. Distributed under MIT license.
  4. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
  5. */
  6. /* Parameters for the Brotli encoder with chosen quality levels. */
  7. type hasherParams struct {
  8. type_ int
  9. bucket_bits int
  10. block_bits int
  11. hash_len int
  12. num_last_distances_to_check int
  13. }
  14. type distanceParams struct {
  15. distance_postfix_bits uint32
  16. num_direct_distance_codes uint32
  17. alphabet_size uint32
  18. max_distance uint
  19. }
  20. /* Encoding parameters */
  21. type encoderParams struct {
  22. mode int
  23. quality int
  24. lgwin uint
  25. lgblock int
  26. size_hint uint
  27. disable_literal_context_modeling bool
  28. large_window bool
  29. hasher hasherParams
  30. dist distanceParams
  31. dictionary encoderDictionary
  32. }