diff options
author | Eugene Kliuchnikov <eustas@google.com> | 2017-07-21 10:07:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-21 10:07:24 +0200 |
commit | 52441069ef31c3c02a4aecad727f2ec5a17ab68b (patch) | |
tree | d2a7e7d0b60c9b365ba4d871bf8e535b6e9abc2e /research/deorummolae.h | |
parent | 172a378debedec81eb19747c96c28a81d917d284 (diff) | |
download | brotli-52441069ef31c3c02a4aecad727f2ec5a17ab68b.zip brotli-52441069ef31c3c02a4aecad727f2ec5a17ab68b.tar.gz brotli-52441069ef31c3c02a4aecad727f2ec5a17ab68b.tar.bz2 |
Update (#574)custom-dictionary
* Update
* decoder: better behavior after failure
* encoder: replace "len_x_code" with delta
* research: add experimental dictionary generator
* python: test combing
Diffstat (limited to 'research/deorummolae.h')
-rwxr-xr-x | research/deorummolae.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/research/deorummolae.h b/research/deorummolae.h new file mode 100755 index 0000000..f37015c --- /dev/null +++ b/research/deorummolae.h @@ -0,0 +1,27 @@ +#ifndef BROTLI_RESEARCH_DEORUMMOLAE_H_ +#define BROTLI_RESEARCH_DEORUMMOLAE_H_ + +#include <stddef.h> +#include <stdint.h> + +/* 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 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_data concatenated samples + * @return generated dictionary size + */ +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_ |