Parolin
0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
val
xcx_brotli
brotli-1.0.9
c
enc
utf8_util.h
Go to the documentation of this file.
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_
11
12
#include "
../common/platform.h
"
13
#include <brotli/types.h>
14
15
#if defined(__cplusplus) || defined(c_plusplus)
16
extern
"C"
{
17
#endif
18
19
static
const
double
kMinUTF8Ratio = 0.75;
20
21
/* Returns 1 if at least min_fraction of the bytes between pos and
22
pos + length in the (data, mask) ring-buffer is UTF8-encoded, otherwise
23
returns 0. */
24
BROTLI_INTERNAL
BROTLI_BOOL
BrotliIsMostlyUTF8
(
25
const
uint8_t*
data
,
const
size_t
pos,
const
size_t
mask,
26
const
size_t
length,
const
double
min_fraction);
27
28
#if defined(__cplusplus) || defined(c_plusplus)
29
}
/* extern "C" */
30
#endif
31
32
#endif
/* BROTLI_ENC_UTF8_UTIL_H_ */
BrotliIsMostlyUTF8
BROTLI_INTERNAL BROTLI_BOOL BrotliIsMostlyUTF8(const uint8_t *data, const size_t pos, const size_t mask, const size_t length, const double min_fraction)
Definition
utf8_util.c:68
data
Definition
poolTests.c:28
platform.h
BROTLI_INTERNAL
#define BROTLI_INTERNAL
Definition
platform.h:173
BROTLI_BOOL
#define BROTLI_BOOL
Definition
types.h:49
Generated by
1.12.0