bit_cost.c 824 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* Copyright 2013 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. /* Functions to estimate the bit cost of Huffman trees. */
  6. #include "./bit_cost.h"
  7. #include "../common/constants.h"
  8. #include "../common/platform.h"
  9. #include <brotli/types.h>
  10. #include "./fast_log.h"
  11. #include "./histogram.h"
  12. #if defined(__cplusplus) || defined(c_plusplus)
  13. extern "C" {
  14. #endif
  15. #define FN(X) X ## Literal
  16. #include "./bit_cost_inc.h" /* NOLINT(build/include) */
  17. #undef FN
  18. #define FN(X) X ## Command
  19. #include "./bit_cost_inc.h" /* NOLINT(build/include) */
  20. #undef FN
  21. #define FN(X) X ## Distance
  22. #include "./bit_cost_inc.h" /* NOLINT(build/include) */
  23. #undef FN
  24. #if defined(__cplusplus) || defined(c_plusplus)
  25. } /* extern "C" */
  26. #endif