| 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 | /* Heuristics for deciding about the UTF8-ness of strings. */ |
| 8 | |
| 9 | #ifndef BROTLI_ENC_UTF8_UTIL_H_ |
| 10 | #define BROTLI_ENC_UTF8_UTIL_H_cxx . . $ `c/enc/utf8_util.h:10:9`! |
| 11 | |
| 12 | #include "../common/platform.h"cxx . . $ `<file>/c/common/platform.h`/ |
| 13 | |
| 14 | #if defined(__cplusplus) || defined(c_plusplus) |
| 15 | extern "C" { |
| 16 | #endif |
| 17 | |
| 18 | static const double kMinUTF8Ratiocxx . . $ kMinUTF8Ratio. = 0.75; |
| 19 | |
| 20 | /* Returns 1 if at least min_fraction of the bytes between pos and |
| 21 | pos + length in the (data, mask) ring-buffer is UTF8-encoded, otherwise |
| 22 | returns 0. */ |
| 23 | BROTLI_INTERNALcxx . . $ `c/include/brotli/port.h:252:9`! BROTLI_BOOLcxx . . $ `c/include/brotli/types.h:49:9`! BrotliIsMostlyUTF8cxx . . $ BrotliIsMostlyUTF8(23eeb684559eec73).( |
| 24 | const uint8_tcxx . . $ uint8_t#* data, const size_tcxx . . $ size_t# pos, const size_tcxx . . $ size_t# mask, |
| 25 | const size_tcxx . . $ size_t# length, const double min_fraction); |
| 26 | |
| 27 | #if defined(__cplusplus) || defined(c_plusplus) |
| 28 | } /* extern "C" */ |
| 29 | #endif |
| 30 | |
| 31 | #endif /* BROTLI_ENC_UTF8_UTIL_H_ */ |