deorummolae.h 733 B

1234567891011121314151617181920212223242526
  1. #ifndef BROTLI_RESEARCH_DEORUMMOLAE_H_
  2. #define BROTLI_RESEARCH_DEORUMMOLAE_H_
  3. #include <cstddef>
  4. #include <cstdint>
  5. #include <string>
  6. #include <vector>
  7. /* log2(maximal number of files). Value 6 provides some speedups. */
  8. #define DM_LOG_MAX_FILES 6
  9. /* Non tunable definitions. */
  10. #define DM_MAX_FILES (1 << DM_LOG_MAX_FILES)
  11. /**
  12. * Generate a dictionary for given samples.
  13. *
  14. * @param dictionary_size_limit maximal dictionary size
  15. * @param sample_sizes vector with sample sizes
  16. * @param sample_data concatenated samples
  17. * @return generated dictionary
  18. */
  19. std::string DM_generate(size_t dictionary_size_limit,
  20. const std::vector<size_t>& sample_sizes, const uint8_t* sample_data);
  21. #endif // BROTLI_RESEARCH_DEORUMMOLAE_H_