params.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* Copyright 2017 Google Inc. All Rights Reserved.
  2. Distributed under MIT license.
  3. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
  4. */
  5. /* Parameters for the Brotli encoder with chosen quality levels. */
  6. #ifndef BROTLI_ENC_PARAMS_H_
  7. #define BROTLI_ENC_PARAMS_H_
  8. #include <brotli/encode.h>
  9. #include "./encoder_dict.h"
  10. typedef struct BrotliHasherParams {
  11. int type;
  12. int bucket_bits;
  13. int block_bits;
  14. int hash_len;
  15. int num_last_distances_to_check;
  16. } BrotliHasherParams;
  17. typedef struct BrotliDistanceParams {
  18. uint32_t distance_postfix_bits;
  19. uint32_t num_direct_distance_codes;
  20. uint32_t alphabet_size_max;
  21. uint32_t alphabet_size_limit;
  22. size_t max_distance;
  23. } BrotliDistanceParams;
  24. /* Encoding parameters */
  25. typedef struct BrotliEncoderParams {
  26. BrotliEncoderMode mode;
  27. int quality;
  28. int lgwin;
  29. int lgblock;
  30. size_t stream_offset;
  31. size_t size_hint;
  32. BROTLI_BOOL disable_literal_context_modeling;
  33. BROTLI_BOOL large_window;
  34. BrotliHasherParams hasher;
  35. BrotliDistanceParams dist;
  36. BrotliEncoderDictionary dictionary;
  37. } BrotliEncoderParams;
  38. #endif /* BROTLI_ENC_PARAMS_H_ */