aboutsummaryrefslogtreecommitdiff
path: root/enc/static_dict.h
diff options
context:
space:
mode:
Diffstat (limited to 'enc/static_dict.h')
-rw-r--r--enc/static_dict.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/enc/static_dict.h b/enc/static_dict.h
index 7891186..24ccf49 100644
--- a/enc/static_dict.h
+++ b/enc/static_dict.h
@@ -10,10 +10,13 @@
#define BROTLI_ENC_STATIC_DICT_H_
#include "../common/types.h"
+#include "./port.h"
-namespace brotli {
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
-static const size_t kMaxDictionaryMatchLen = 37;
+#define BROTLI_MAX_STATIC_DICTIONARY_MATCH_LEN 37
static const uint32_t kInvalidMatch = 0xfffffff;
/* Matches data against static dictionary words, and for each length l,
@@ -23,11 +26,13 @@ static const uint32_t kInvalidMatch = 0xfffffff;
Prerequisites:
matches array is at least BROTLI_MAX_STATIC_DICTIONARY_MATCH_LEN + 1 long
all elements are initialized to kInvalidMatch */
-bool FindAllStaticDictionaryMatches(const uint8_t* data,
- size_t min_length,
- size_t max_length,
- uint32_t* matches);
-
-} // namespace brotli
+BROTLI_INTERNAL int BrotliFindAllStaticDictionaryMatches(const uint8_t* data,
+ size_t min_length,
+ size_t max_length,
+ uint32_t* matches);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+} /* extern "C" */
+#endif
#endif /* BROTLI_ENC_STATIC_DICT_H_ */