aboutsummaryrefslogtreecommitdiff
path: root/research/deorummolae.h
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2018-09-25 12:25:15 -0700
committerTianjie Xu <xunchang@google.com>2018-09-25 22:00:32 +0000
commita5dcb7cf83648585dfacad1015ec2a9af5b361d8 (patch)
tree25f44c98c1f9967ed8157b42714fa04250950400 /research/deorummolae.h
parentf55cbaf6e7c4b59848139c69c02b600ad738938a (diff)
downloadbrotli-a5dcb7cf83648585dfacad1015ec2a9af5b361d8.tar.gz
Revert "Revert "Merge tag 'v1.0.5' into HEAD""
Bug: 114832768 Test: mma This reverts commit c4af2b09ada22257ff12967537264627a3936822. Change-Id: Ibea95f37fb1ce2ef6ae7d40aaac2a3ec41a2c5c9
Diffstat (limited to 'research/deorummolae.h')
-rw-r--r--[-rwxr-xr-x]research/deorummolae.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/research/deorummolae.h b/research/deorummolae.h
index f37015c..5815097 100755..100644
--- a/research/deorummolae.h
+++ b/research/deorummolae.h
@@ -1,27 +1,26 @@
#ifndef BROTLI_RESEARCH_DEORUMMOLAE_H_
#define BROTLI_RESEARCH_DEORUMMOLAE_H_
-#include <stddef.h>
-#include <stdint.h>
+#include <cstddef>
+#include <cstdint>
+#include <string>
+#include <vector>
/* log2(maximal number of files). Value 6 provides some speedups. */
-#define LOG_MAX_FILES 6
+#define DM_LOG_MAX_FILES 6
/* Non tunable definitions. */
-#define MAX_FILES (1 << LOG_MAX_FILES)
+#define DM_MAX_FILES (1 << DM_LOG_MAX_FILES)
/**
* Generate a dictionary for given samples.
*
- * @param dictionary storage for generated dictionary
* @param dictionary_size_limit maximal dictionary size
- * @param num_samples number of samples
- * @param sample_sizes array with sample sizes
+ * @param sample_sizes vector with sample sizes
* @param sample_data concatenated samples
- * @return generated dictionary size
+ * @return generated dictionary
*/
-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);
+std::string DM_generate(size_t dictionary_size_limit,
+ const std::vector<size_t>& sample_sizes, const uint8_t* sample_data);
#endif // BROTLI_RESEARCH_DEORUMMOLAE_H_