Lines Matching refs:data
28 static inline uint32_t DecodeUnsignedLeb128(const uint8_t** data) {
29 const uint8_t* ptr = *data;
49 *data = ptr;
57 static inline int32_t DecodeUnsignedLeb128P1(const uint8_t** data) {
58 return DecodeUnsignedLeb128(data) - 1;
64 static inline int32_t DecodeSignedLeb128(const uint8_t** data) {
65 const uint8_t* ptr = *data;
93 *data = ptr;
98 static inline uint32_t UnsignedLeb128Size(uint32_t data) {
99 // bits_to_encode = (data != 0) ? 32 - CLZ(x) : 1 // 32 - CLZ(data | 1)
101 uint32_t x = 6 + 32 - CLZ(data | 1);
108 static inline uint32_t SignedLeb128Size(int32_t data) {
110 data = data ^ (data >> 31);
111 uint32_t x = 1 /* we need to encode the sign bit */ + 6 + 32 - CLZ(data | 1);
140 // An encoder with an API similar to vector<uint32_t> where the data is captured in ULEB128 format.