| OLD | NEW |
| (Empty) | |
| 1 /* Copyright 2013 Google Inc. All Rights Reserved. |
| 2 |
| 3 Distributed under MIT license. |
| 4 See file LICENSE for detail or copy at https://opensource.org/licenses/MIT |
| 5 */ |
| 6 |
| 7 // Class to model the static dictionary. |
| 8 |
| 9 #ifndef BROTLI_ENC_STATIC_DICT_H_ |
| 10 #define BROTLI_ENC_STATIC_DICT_H_ |
| 11 |
| 12 #include "./types.h" |
| 13 |
| 14 namespace brotli { |
| 15 |
| 16 static const size_t kMaxDictionaryMatchLen = 37; |
| 17 static const uint32_t kInvalidMatch = 0xfffffff; |
| 18 |
| 19 // Matches data against static dictionary words, and for each length l, |
| 20 // for which a match is found, updates matches[l] to be the minimum possible |
| 21 // (distance << 5) + len_code. |
| 22 // Prerequisites: |
| 23 // matches array is at least kMaxDictionaryMatchLen + 1 long |
| 24 // all elements are initialized to kInvalidMatch |
| 25 bool FindAllStaticDictionaryMatches(const uint8_t* data, |
| 26 size_t min_length, |
| 27 size_t max_length, |
| 28 uint32_t* matches); |
| 29 |
| 30 } // namespace brotli |
| 31 |
| 32 #endif // BROTLI_ENC_STATIC_DICT_H_ |
| OLD | NEW |