2017-07-21 08:07:24 +00:00
|
|
|
#ifndef BROTLI_RESEARCH_DEORUMMOLAE_H_
|
|
|
|
#define BROTLI_RESEARCH_DEORUMMOLAE_H_
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
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. */
|
|
|
|
#define LOG_MAX_FILES 6
|
|
|
|
|
|
|
|
/* Non tunable definitions. */
|
|
|
|
#define MAX_FILES (1 << LOG_MAX_FILES)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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_
|