Home
last modified time | relevance | path

Searched +full:utf +full:- +full:8 +full:- +full:validate (Results 1 – 25 of 1105) sorted by relevance

12345678910>>...45

/aosp_15_r20/external/rust/android-crates-io/crates/bstr/src/
Dutf8.rs8 // The UTF-8 decoder provided here is based on the one presented here:
9 // https://bjoern.hoehrmann.de/utf-8/decoder/dfa/
11 // We *could* have done UTF-8 decoding by using a DFA generated by `\p{any}`
12 // using regex-automata that is roughly the same size. The real benefit of
28 // Thirdly, we pre-multiply the state IDs to avoid a multiplication instruction
29 // in the core decoding loop. (Which is what regex-automata would do by
35 // It is unlikely that this is the fastest way to do UTF-8 decoding, however,
51 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
52 10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3, 11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,
72 /// When invalid UTF-8 byte sequences are found, they are substituted with the
[all …]
/aosp_15_r20/external/rust/android-crates-io/crates/grpcio-sys/grpc/third_party/utf8_range/
DREADME.md1 [![Build Status](https://travis-ci.com/cyb70289/utf8.svg?branch=master)](https://travis-ci.com/cyb7…
3 # Fast UTF-8 validation with Range algorithm (NEON+SSE4+AVX2)
5 This is a brand new algorithm to leverage SIMD for fast UTF-8 string validation. Both **NEON**(armv…
7UTF-8 validation methods are compared on both x86 and Arm platforms. Benchmark result shows range …
10 * range-neon.c: NEON version
11 * range-sse.c: SSE4 version
12 * range-avx2.c: AVX2 version
13 * range2-neon.c, range2-sse.c: Process two blocks in one iteration
14 * [Lemire's SIMD implementation](https://github.com/lemire/fastvalidate-utf-8)
15 * lemire-sse.c: SSE4 version
[all …]
/aosp_15_r20/external/grpc-grpc/third_party/utf8_range/
H A DREADME.md1 [![Build Status](https://travis-ci.com/cyb70289/utf8.svg?branch=master)](https://travis-ci.com/cyb7…
3 # Fast UTF-8 validation with Range algorithm (NEON+SSE4+AVX2)
5 This is a brand new algorithm to leverage SIMD for fast UTF-8 string validation. Both **NEON**(armv…
7UTF-8 validation methods are compared on both x86 and Arm platforms. Benchmark result shows range …
10 * range-neon.c: NEON version
11 * range-sse.c: SSE4 version
12 * range-avx2.c: AVX2 version
13 * range2-neon.c, range2-sse.c: Process two blocks in one iteration
14 * [Lemire's SIMD implementation](https://github.com/lemire/fastvalidate-utf-8)
15 * lemire-sse.c: SSE4 version
[all …]
/aosp_15_r20/external/grpc-grpc/third_party/upb/upb/message/
H A Dutf8_test.cc1 // Protocol Buffers - Google's data interchange format
4 // Use of this source code is governed by a BSD-style
6 // https://developers.google.com/open-source/licenses/bsd
40 // Parse succeeds, because the bytes field does not validate UTF-8. in TEST()
56 // Parse fails, because proto3 string fields validate UTF-8. in TEST()
73 // Parse fails, because proto3 string fields validate UTF-8. in TEST()
90 // Parse succeeds, because proto2 bytes fields don't validate UTF-8. in TEST()
107 // Parse succeeds, because proto2 bytes fields don't validate UTF-8. in TEST()
124 // Parse succeeds, because proto2 string fields don't validate UTF-8. in TEST()
184 // // Parse fails, because proto3 string fields validate UTF-8.
[all …]
/aosp_15_r20/external/bazelbuild-rules_android/src/tools/enforce_min_sdk_floor/
H A Denforce_min_sdk_floor.py1 # pylint: disable=g-direct-third-party-import
8 # http://www.apache.org/licenses/LICENSE-2.0
30 VALIDATE = "validate" variable
33 USES_SDK = "uses-sdk"
41 [BUMP, VALIDATE, SET_DEFAULT],
42 f"Action to perform, either {BUMP}, {VALIDATE}, or {SET_DEFAULT}")
78 ns_parser = ET.XMLPullParser(events=["start-ns"])
97 - str: The xml contents of the manifest with the min SDK floor enforced.
100 - str: log message of action taken
112 ET.tostring(root, encoding="utf-8", xml_declaration=True),
[all …]
/aosp_15_r20/external/google-auth-library-java/oauth2_http/javatests/com/google/auth/oauth2/
H A DAwsCredentialsTest.java73 "https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15";
76 "https://sts.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15";
79 …"https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/[email protected]
141 // Validate metrics header is set correctly on the sts request. in refreshAccessToken_withoutServiceAccountImpersonation()
171 // Validate metrics header is set correctly on the sts request. in refreshAccessToken_withServiceAccountImpersonation()
203 // Validate that default lifetime was set correctly on the request. in refreshAccessToken_withServiceAccountImpersonationOptions()
211 // Validate metrics header is set correctly on the sts request. in refreshAccessToken_withServiceAccountImpersonationOptions()
239 // Validate metrics header is set correctly on the sts request. in refreshAccessTokenProgrammaticRefresh_withoutServiceAccountImpersonation()
272 // Validate metrics header is set correctly on the sts request. in refreshAccessTokenProgrammaticRefresh_withServiceAccountImpersonation()
290 String subjectToken = URLDecoder.decode(awsCredential.retrieveSubjectToken(), "UTF-8"); in retrieveSubjectToken()
[all …]
/aosp_15_r20/external/pigweed/pw_sensor/py/pw_sensor/
H A Dsensor_desc.py7 # https://www.apache.org/licenses/LICENSE-2.0
31 _LOG = logging.getLogger("sensor-describe")
49 def get_args() -> Args:
56 "--include-path",
57 "-I",
64 "--verbose",
65 "-v",
71 "--generator",
72 "-g",
78 "-o",
[all …]
/aosp_15_r20/external/libchrome/base/i18n/
H A Dstreaming_utf8_validator.h2 // Use of this source code is governed by a BSD-style license that can be
5 // A streaming validator for UTF-8. Validation is based on the definition in
6 // RFC-3629. In particular, it does not reject the invalid characters rejected
28 // VALID_MIDPOINT. If it encounters an invalid byte or UTF-8 sequence the
39 // Validate |size| bytes starting at |data|. If the concatenation of all calls
40 // to AddBytes() since this object was constructed or reset is a valid UTF-8
41 // string, returns VALID_ENDPOINT. If it could be the prefix of a valid UTF-8
42 // string, returns VALID_MIDPOINT. If an invalid byte or UTF-8 sequence was
46 // Return the object to a freshly-constructed state so that it can be re-used.
49 // Validate a complete string using the same criteria. Returns true if the
[all …]
H A Dstreaming_utf8_validator_unittest.cc2 // Use of this source code is governed by a BSD-style license that can be
19 // accepts exactly the same set of 4-byte strings as ICU-based validation. This
20 // tests every possible 4-byte string, so it is too slow to run routinely on
21 // low-powered machines.
61 // non-characters valid (and doesn't require a string as input).
74 // Converts the passed-in integer to a 4 byte string and then
76 // whether it is valid UTF-8 or not.
92 // Tests the 4-byte sequences corresponding to the |size| integers
128 base::TaskScheduler::GetInstance()->Shutdown(); in TEST_F()
129 base::TaskScheduler::GetInstance()->JoinForTesting(); in TEST_F()
[all …]
/aosp_15_r20/external/cronet/base/i18n/
H A Dstreaming_utf8_validator.h2 // Use of this source code is governed by a BSD-style license that can be
5 // A streaming validator for UTF-8. Validation is based on the definition in
6 // RFC-3629. In particular, it does not reject the invalid characters rejected
28 // VALID_MIDPOINT. If it encounters an invalid byte or UTF-8 sequence the
38 // This type could be made copyable but there is currently no use-case for
45 // Validate bytes described by |data|. If the concatenation of all calls
46 // to AddBytes() since this object was constructed or reset is a valid UTF-8
47 // string, returns VALID_ENDPOINT. If it could be the prefix of a valid UTF-8
48 // string, returns VALID_MIDPOINT. If an invalid byte or UTF-8 sequence was
52 // Return the object to a freshly-constructed state so that it can be re-used.
[all …]
H A Dstreaming_utf8_validator_unittest.cc2 // Use of this source code is governed by a BSD-style license that can be
45 // non-characters valid (and doesn't require a string as input).
57 // Converts the passed-in integer to a 4 byte string and then
59 // whether it is valid UTF-8 or not.
73 // Tests the 4-byte sequences corresponding to the |size| integers
94 // 4-byte strings as ICU-based validation. This tests every possible 4-byte
95 // string, so it is too slow to run routinely on low-powered machines.
113 // These valid and invalid UTF-8 sequences are based on the tests from
117 // partial sequences are constructed by taking non-empty prefixes of these
121 "\xef\xbb\xbf", // UTF-8 BOM
[all …]
H A Dstreaming_utf8_validator_perftest.cc2 // Use of this source code is governed by a BSD-style license that can be
30 // We want to test ranges of valid UTF-8 sequences. These ranges are inclusive.
37 const char kTwoByteSeqRangeStart[] = "\xc2\xa0"; // U+00A0 non-breaking space
49 // Simplest possible byte-at-a-time validator, to provide a baseline
50 // for comparison. This is only tried on 1-byte UTF-8 sequences, as
52 // top-bit-set bytes.
61 // Assumes that |previous| is a valid UTF-8 sequence, and attempts to return
65 DCHECK(StreamingUtf8Validator::Validate(previous)); in NextUtf8Sequence()
67 for (int i = static_cast<int>(previous.length() - 1); i >= 0; --i) { in NextUtf8Sequence()
68 // All bytes in a UTF-8 sequence except the first one are in NextUtf8Sequence()
[all …]
/aosp_15_r20/external/openthread/third_party/mbedtls/repo/scripts/
H A Dgenerate_driver_wrappers.py10 # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
40 def render(template_path: str, driver_jsoncontext: list) -> str:
54 driver_jsoncontext: list) -> None:
65 encoding='UTF-8') as out_file:
69 def validate_json(driverjson_data: Driver, driverschema_list: dict) -> None:
71 Validate the Driver JSON against an appropriate schema
78 jsonschema.validate(instance=driverjson_data, schema=_schema)
91 print("Error: Failed to validate data file: {} using schema: {}."
94 print("Error: Failed to validate data file: {} using schema: {}."
100 def load_driver(schemas: Dict[str, Any], driver_file: str) -> Any:
[all …]
/aosp_15_r20/external/mbedtls/scripts/
H A Dgenerate_driver_wrappers.py10 # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
40 def render(template_path: str, driver_jsoncontext: list) -> str:
54 driver_jsoncontext: list) -> None:
65 encoding='UTF-8') as out_file:
69 def validate_json(driverjson_data: Driver, driverschema_list: dict) -> None:
71 Validate the Driver JSON against an appropriate schema
78 jsonschema.validate(instance=driverjson_data, schema=_schema)
91 print("Error: Failed to validate data file: {} using schema: {}."
94 print("Error: Failed to validate data file: {} using schema: {}."
100 def load_driver(schemas: Dict[str, Any], driver_file: str) -> Any:
[all …]
/aosp_15_r20/external/python/apitools/apitools/base/protorpclite/
Dmessages.py9 # http://www.apache.org/licenses/LICENSE-2.0
18 # pylint: disable=too-many-lines
20 """Stand-alone implementation of in memory protocol messages.
30 StringField: Field for UTF-8 string values.
86 # pylint:disable=attribute-defined-outside-init
87 # pylint:disable=protected-access
160 MAX_ENUM_VALUE = (2 ** 29) - 1
164 MAX_FIELD_NUMBER = (2 ** 29) - 1
172 # pylint: disable=no-value-for-parameter
174 """Base meta-class used for definition meta-classes.
[all …]
/aosp_15_r20/external/deqp/external/openglcts/modules/gl/
H A Dgl4cShadingLanguage420PackTests.hpp3 /*-------------------------------------------------------------------------
5 * -----------------------------
7 * Copyright (c) 2014-2016 The Khronos Group Inc.
13 * http://www.apache.org/licenses/LICENSE-2.0
24 */ /*-------------------------------------------------------------------*/
29 */ /*-------------------------------------------------------------------*/
610 * * Unix-style new line continuation:
612 * Run test with shader that contains line continuation and Unix-style (LF)
615 * - assignment expression (after and before '=' operator)
617 * - vector variable initializer (after ',' in contructor)
[all …]
/aosp_15_r20/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
H A DDatagramSocketTest.java9 * http://www.apache.org/licenses/LICENSE-2.0
60 rbuf[0] = -1; in DatagramServer()
195 "UTF-8"); in assertPacketDataEquals()
197 "UTF-8"); in assertPacketDataEquals()
224 // Validate that once connected we cannot send to another address.
239 // Validate that we can connect, then disconnect, then connect then
265 // Validate that we can connect/disconnect then send/recv to any address
334 assertEquals("Incorrect Port", -1, ds.getPort()); in test_disconnect()
343 assertEquals("Incorrect Port", -1, ds.getPort()); in test_disconnect()
371 assertEquals("Expected -1 for remote port as not connected", -1, in test_getPort()
[all …]
/aosp_15_r20/external/cronet/third_party/rust/chromium_crates_io/vendor/serde_json-1.0.115/src/
H A Dread.rs30 fn next(&mut self) -> Result<Option<u8>>; in next()
32 fn peek(&mut self) -> Result<Option<u8>>; in peek()
46 fn position(&self) -> Position; in position()
56 fn peek_position(&self) -> Position; in peek_position()
61 fn byte_offset(&self) -> usize; in byte_offset()
63 /// Assumes the previous byte was a quotation mark. Parses a JSON-escaped
67 fn parse_str<'s>(&'s mut self, scratch: &'s mut Vec<u8>) -> Result<Reference<'de, 's, str>>; in parse_str()
69 /// Assumes the previous byte was a quotation mark. Parses a JSON-escaped
79 ) -> Result<Reference<'de, 's, [u8]>>; in parse_str_raw()
81 /// Assumes the previous byte was a quotation mark. Parses a JSON-escaped
[all …]
/aosp_15_r20/external/rust/android-crates-io/crates/serde_json/src/
Dread.rs28 fn next(&mut self) -> Result<Option<u8>>; in next()
30 fn peek(&mut self) -> Result<Option<u8>>; in peek()
44 fn position(&self) -> Position; in position()
54 fn peek_position(&self) -> Position; in peek_position()
59 fn byte_offset(&self) -> usize; in byte_offset()
61 /// Assumes the previous byte was a quotation mark. Parses a JSON-escaped
65 fn parse_str<'s>(&'s mut self, scratch: &'s mut Vec<u8>) -> Result<Reference<'de, 's, str>>; in parse_str()
67 /// Assumes the previous byte was a quotation mark. Parses a JSON-escaped
77 ) -> Result<Reference<'de, 's, [u8]>>; in parse_str_raw()
79 /// Assumes the previous byte was a quotation mark. Parses a JSON-escaped
[all …]
/aosp_15_r20/external/fonttools/Lib/fontTools/ufoLib/
H A D__init__.py77 # ---------
79 # ---------
113 # --------------
115 # --------------
194 # ----------
196 # ----------
203 By default read data is validated. Set ``validate`` to
204 ``False`` to not validate the data.
207 def __init__(self, path, validate=True): argument
215 parentFS = fs.zipfs.ZipFS(path, write=False, encoding="utf-8")
[all …]
H A DglifLib.py2 glifLib.py -- Generic module for reading and writing the .glif format.
54 # ---------
56 # ---------
88 # ------------
90 # ------------
119 # ---------
121 # ---------
159 ``validateRead`` will validate read operations. Its default is ``True``.
160 ``validateWrite`` will validate write operations. Its default is ``True``.
197 # network or in-memory FS may not map to the local one
[all …]
/aosp_15_r20/libcore/luni/src/test/java/libcore/xml/
H A DExpatSaxParserTest.java8 * http://www.apache.org/licenses/LICENSE-2.0
109 validate(handler); in testSax()
114 validate(handler); in testSax()
120 validate(handler); in testSax()
128 static void validate(TestHandler handler) { in validate() method in ExpatSaxParserTest
147 // Validate attributes. in startElement()
179 handler.validate(); in testNamespaces()
197 public void validate() { in validate() method in ExpatSaxParserTest.NamespaceHandler
288 assertEquals(-1, atts.getIndex("ns:default", "e")); in startElement()
537 * try to use the parent parser's encoding which is utf-16. in testExternalEntity()
[all …]
/aosp_15_r20/external/tensorflow/tensorflow/python/ops/ragged/
H A Dragged_string_ops.py7 # http://www.apache.org/licenses/LICENSE-2.0
45 def string_bytes_split(input, name=None): # pylint: disable=redefined-builtin
76 raise ValueError("input must have a statically-known rank.")
85 validate=False)
90 # pylint: disable=redefined-builtin
107 codepoint sequence. Can be `"UTF-8"`, `"UTF-16-BE"`, or `"UTF-32-BE"`.
127 >>> print(unicode_encode(input, 'UTF-8'))
137 # If the flat_values of our ragged tensor is multi-dimensional, we can
159 # The input tensor is of the correct 2-D shape, it's just not ragged.
164 # We need to initially flatten the input tensor to 2-D, and then can
[all …]
/aosp_15_r20/external/apache-xml/test/java/src/org/apache/qetest/trax/
H A DTransformerAPITest.java10 * http://www.apache.org/licenses/LICENSE-2.0
52 //-------------------------------------------------------------------------
65 /** Cheap-o filename for various output files. */
68 /** Cheap-o filename set for general API tests. */
85 /** Just goldName for outputFormatTest with UTF-8 */
94 public static final String ENCODING_VALUE ="UTF-16";
96 public static final String DOCTYPE_PUBLIC_VALUE = "this-is-doctype-public";
97 public static final String DOCTYPE_SYSTEM_VALUE = "this-is-doctype-system";
103 /** Cheap-o filename set(s) for multiple transform tests. */
120 * Initialize this test - Set names of xml/xsl test files, cache system property.
[all …]
/aosp_15_r20/external/cronet/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.2.1/src/
H A Dread.rs30 fn next(&mut self) -> Result<Option<u8>>; in next()
32 fn peek(&mut self) -> Result<Option<u8>>; in peek()
46 fn position(&self) -> Position; in position()
56 fn peek_position(&self) -> Position; in peek_position()
61 fn byte_offset(&self) -> usize; in byte_offset()
63 /// Assumes the previous byte was a quotation mark. Parses a JSON-escaped
67 fn parse_str<'s>(&'s mut self, scratch: &'s mut Vec<u8>) -> Result<Reference<'de, 's, str>>; in parse_str()
69 /// Assumes the previous byte was a quotation mark. Parses a JSON-escaped
79 ) -> Result<Reference<'de, 's, [u8]>>; in parse_str_raw()
81 /// Assumes the previous byte was a quotation mark. Parses a JSON-escaped
[all …]

12345678910>>...45