aboutsummaryrefslogtreecommitdiff
path: root/research/deorummolae.h
diff options
context:
space:
mode:
Diffstat (limited to 'research/deorummolae.h')
-rwxr-xr-x[-rw-r--r--]research/deorummolae.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/research/deorummolae.h b/research/deorummolae.h
index 5815097..f37015c 100644..100755
--- a/research/deorummolae.h
+++ b/research/deorummolae.h
@@ -1,26 +1,27 @@
#ifndef BROTLI_RESEARCH_DEORUMMOLAE_H_
#define BROTLI_RESEARCH_DEORUMMOLAE_H_
-#include <cstddef>
-#include <cstdint>
-#include <string>
-#include <vector>
+#include <stddef.h>
+#include <stdint.h>
/* log2(maximal number of files). Value 6 provides some speedups. */
-#define DM_LOG_MAX_FILES 6
+#define LOG_MAX_FILES 6
/* Non tunable definitions. */
-#define DM_MAX_FILES (1 << DM_LOG_MAX_FILES)
+#define MAX_FILES (1 << LOG_MAX_FILES)
/**
* Generate a dictionary for given samples.
*
+ * @param dictionary storage for generated dictionary
* @param dictionary_size_limit maximal dictionary size
- * @param sample_sizes vector with sample sizes
+ * @param num_samples number of samples
+ * @param sample_sizes array with sample sizes
* @param sample_data concatenated samples
- * @return generated dictionary
+ * @return generated dictionary size
*/
-std::string DM_generate(size_t dictionary_size_limit,
- const std::vector<size_t>& sample_sizes, const uint8_t* sample_data);
+size_t DM_generate(uint8_t* dictionary, size_t dictionary_size_limit,
+ size_t num_samples, const size_t* sample_sizes,
+ const uint8_t* sample_data);
#endif // BROTLI_RESEARCH_DEORUMMOLAE_H_