2015-11-27 10:27:11 +00:00
|
|
|
/* Copyright 2013 Google Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
Distributed under MIT license, or public domain if desired and
|
|
|
|
recognized in your jurisdiction.
|
|
|
|
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
|
|
|
|
*/
|
|
|
|
|
2014-02-17 13:25:36 +00:00
|
|
|
// Collection of static dictionary words.
|
|
|
|
|
|
|
|
#ifndef BROTLI_ENC_DICTIONARY_H_
|
|
|
|
#define BROTLI_ENC_DICTIONARY_H_
|
|
|
|
|
2015-10-01 10:08:14 +00:00
|
|
|
#include "./types.h"
|
2014-10-28 13:05:53 +00:00
|
|
|
|
2015-10-01 11:08:43 +00:00
|
|
|
// No namespace, use same identifier as for the C decoder.
|
|
|
|
|
2015-10-01 12:30:22 +00:00
|
|
|
#if defined(__cplusplus) || defined(c_plusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2015-10-01 11:08:43 +00:00
|
|
|
extern const uint8_t kBrotliDictionary[122784];
|
2014-02-17 13:25:36 +00:00
|
|
|
|
|
|
|
static const int kBrotliDictionaryOffsetsByLength[] = {
|
2014-03-25 15:48:25 +00:00
|
|
|
0, 0, 0, 0, 0, 4096, 9216, 21504, 35840, 44032,
|
|
|
|
53248, 63488, 74752, 87040, 93696, 100864, 104704, 106752, 108928, 113536,
|
|
|
|
115968, 118528, 119872, 121280, 122016,
|
2014-02-17 13:25:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static const int kBrotliDictionarySizeBitsByLength[] = {
|
2014-03-25 15:48:25 +00:00
|
|
|
0, 0, 0, 0, 10, 10, 11, 11, 10, 10,
|
|
|
|
10, 10, 10, 9, 9, 8, 7, 7, 8, 7,
|
|
|
|
7, 6, 6, 5, 5,
|
2014-02-17 13:25:36 +00:00
|
|
|
};
|
|
|
|
|
2015-10-01 11:08:43 +00:00
|
|
|
static const int kBrotliMinDictionaryWordLength = 4;
|
|
|
|
static const int kBrotliMaxDictionaryWordLength = 24;
|
2014-02-17 13:25:36 +00:00
|
|
|
|
2015-10-01 12:30:22 +00:00
|
|
|
#if defined(__cplusplus) || defined(c_plusplus)
|
|
|
|
} /* extern "C" */
|
|
|
|
#endif
|
|
|
|
|
2014-02-17 13:25:36 +00:00
|
|
|
#endif // BROTLI_ENC_DICTIONARY_H_
|