Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/brotli/c/enc/static_dict.h @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 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 <brotli/types.h> | |
| 13 | |
| 14 #include "../common/dictionary.h" | |
| 15 #include "../common/platform.h" | |
| 16 #include "encoder_dict.h" | |
| 17 | |
| 18 #if defined(__cplusplus) || defined(c_plusplus) | |
| 19 extern "C" { | |
| 20 #endif | |
| 21 | |
| 22 #define BROTLI_MAX_STATIC_DICTIONARY_MATCH_LEN 37 | |
| 23 static const uint32_t kInvalidMatch = 0xFFFFFFF; | |
| 24 | |
| 25 /* Matches data against static dictionary words, and for each length l, | |
| 26 for which a match is found, updates matches[l] to be the minimum possible | |
| 27 (distance << 5) + len_code. | |
| 28 Returns 1 if matches have been found, otherwise 0. | |
| 29 Prerequisites: | |
| 30 matches array is at least BROTLI_MAX_STATIC_DICTIONARY_MATCH_LEN + 1 long | |
| 31 all elements are initialized to kInvalidMatch */ | |
| 32 BROTLI_INTERNAL BROTLI_BOOL BrotliFindAllStaticDictionaryMatches( | |
| 33 const BrotliEncoderDictionary* dictionary, | |
| 34 const uint8_t* data, size_t min_length, size_t max_length, | |
| 35 uint32_t* matches); | |
| 36 | |
| 37 #if defined(__cplusplus) || defined(c_plusplus) | |
| 38 } /* extern "C" */ | |
| 39 #endif | |
| 40 | |
| 41 #endif /* BROTLI_ENC_STATIC_DICT_H_ */ |
