params.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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;
  21. size_t max_distance;
  22. } BrotliDistanceParams;
  23. /* Encoding parameters */
  24. typedef struct BrotliEncoderParams {
  25. BrotliEncoderMode mode;
  26. int quality;
  27. int lgwin;
  28. int lgblock;
  29. size_t size_hint;
  30. BROTLI_BOOL disable_literal_context_modeling;
  31. BROTLI_BOOL large_window;
  32. BrotliHasherParams hasher;
  33. BrotliDistanceParams dist;
  34. BrotliEncoderDictionary dictionary;
  35. } BrotliEncoderParams;
  36. #endif /* BROTLI_ENC_PARAMS_H_ */