params.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 num_last_distances_to_check;
  15. } BrotliHasherParams;
  16. typedef struct BrotliDistanceParams {
  17. uint32_t distance_postfix_bits;
  18. uint32_t num_direct_distance_codes;
  19. uint32_t alphabet_size_max;
  20. uint32_t alphabet_size_limit;
  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 stream_offset;
  30. size_t size_hint;
  31. BROTLI_BOOL disable_literal_context_modeling;
  32. BROTLI_BOOL large_window;
  33. BrotliHasherParams hasher;
  34. BrotliDistanceParams dist;
  35. /* TODO(eustas): rename to BrotliShared... */
  36. SharedEncoderDictionary dictionary;
  37. } BrotliEncoderParams;
  38. #endif /* BROTLI_ENC_PARAMS_H_ */