MCPcopy Create free account
hub / github.com/apache/arrow / DecodeOneUTF8Byte

Function DecodeOneUTF8Byte

cpp/src/arrow/util/utf8_internal.h:68–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66static constexpr uint16_t kUTF8ValidateReject = 256;
67
68static inline uint8_t DecodeOneUTF8Byte(uint8_t byte, uint8_t state, uint32_t* codep) {
69 uint8_t type = utf8_small_table[byte];
70
71 *codep = (state != kUTF8DecodeAccept) ? (byte & 0x3fu) | (*codep << 6)
72 : (0xff >> type) & (byte);
73
74 state = utf8_small_table[256 + state + type];
75 return state;
76}
77
78static inline uint16_t ValidateOneUTF8Byte(uint8_t byte, uint16_t state) {
79 return utf8_large_table[state + byte];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected