2017-07-21 08:07:24 +00:00
|
|
|
#ifndef BROTLI_RESEARCH_DEORUMMOLAE_H_
|
|
|
|
#define BROTLI_RESEARCH_DEORUMMOLAE_H_
|
|
|
|
|
2018-02-26 14:04:36 +00:00
|
|
|
#include <cstddef>
|
|
|
|
#include <cstdint>
|
2017-10-13 09:25:03 +00:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2017-07-21 08:07:24 +00:00
|
|
|
/* log2(maximal number of files). Value 6 provides some speedups. */
|
2018-02-26 14:04:36 +00:00
|
|
|
#define DM_LOG_MAX_FILES 6
|
2017-07-21 08:07:24 +00:00
|
|
|
|
|
|
|
/* Non tunable definitions. */
|
2018-02-26 14:04:36 +00:00
|
|
|
#define DM_MAX_FILES (1 << DM_LOG_MAX_FILES)
|
2017-07-21 08:07:24 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Generate a dictionary for given samples.
|
|
|
|
*
|
|
|
|
* @param dictionary_size_limit maximal dictionary size
|
2017-10-13 09:25:03 +00:00
|
|
|
* @param sample_sizes vector with sample sizes
|
2017-07-21 08:07:24 +00:00
|
|
|
* @param sample_data concatenated samples
|
2017-10-13 09:25:03 +00:00
|
|
|
* @return generated dictionary
|
2017-07-21 08:07:24 +00:00
|
|
|
*/
|
2017-10-13 09:25:03 +00:00
|
|
|
std::string DM_generate(size_t dictionary_size_limit,
|
|
|
|
const std::vector<size_t>& sample_sizes, const uint8_t* sample_data);
|
2017-07-21 08:07:24 +00:00
|
|
|
|
|
|
|
#endif // BROTLI_RESEARCH_DEORUMMOLAE_H_
|