Lines Matching refs:pBuf

17 size_t encode<uint64_t>(ByteType*& pBuf, uint64_t pValue) {  in encode()  argument
24 *pBuf++ = byte; in encode()
36 size_t encode<uint32_t>(ByteType*& pBuf, uint32_t pValue) { in encode() argument
38 *pBuf++ = static_cast<ByteType>(pValue); in encode()
41 *pBuf++ = static_cast<ByteType>((pValue & 0x7f) | 0x80); in encode()
42 *pBuf++ = static_cast<ByteType>((pValue >> 7) & 0x7f); in encode()
45 *pBuf++ = static_cast<ByteType>((pValue & 0x7f) | 0x80); in encode()
46 *pBuf++ = static_cast<ByteType>(((pValue >> 7) & 0x7f) | 0x80); in encode()
47 *pBuf++ = static_cast<ByteType>((pValue >> 14) & 0x7f); in encode()
50 *pBuf++ = static_cast<ByteType>((pValue & 0x7f) | 0x80); in encode()
51 *pBuf++ = static_cast<ByteType>(((pValue >> 7) & 0x7f) | 0x80); in encode()
52 *pBuf++ = static_cast<ByteType>(((pValue >> 14) & 0x7f) | 0x80); in encode()
53 *pBuf++ = static_cast<ByteType>((pValue >> 21) & 0x7f); in encode()
56 *pBuf++ = static_cast<ByteType>((pValue & 0x7f) | 0x80); in encode()
57 *pBuf++ = static_cast<ByteType>(((pValue >> 7) & 0x7f) | 0x80); in encode()
58 *pBuf++ = static_cast<ByteType>(((pValue >> 14) & 0x7f) | 0x80); in encode()
59 *pBuf++ = static_cast<ByteType>(((pValue >> 21) & 0x7f) | 0x80); in encode()
60 *pBuf++ = static_cast<ByteType>((pValue >> 28) & 0x7f); in encode()
67 size_t encode<int64_t>(ByteType*& pBuf, int64_t pValue) { in encode() argument
81 *pBuf++ = byte; in encode()
89 size_t encode<int32_t>(ByteType*& pBuf, int32_t pValue) { in encode() argument
90 return encode<int64_t>(pBuf, static_cast<int64_t>(pValue)); in encode()
96 uint64_t decode<uint64_t>(const ByteType* pBuf, size_t& pSize) { in decode() argument
99 if ((*pBuf & 0x80) == 0) { in decode()
101 return *pBuf; in decode()
102 } else if ((*(pBuf + 1) & 0x80) == 0) { in decode()
104 return ((*(pBuf + 1) & 0x7f) << 7) | (*pBuf & 0x7f); in decode()
105 } else if ((*(pBuf + 2) & 0x80) == 0) { in decode()
107 return ((*(pBuf + 2) & 0x7f) << 14) | ((*(pBuf + 1) & 0x7f) << 7) | in decode()
108 (*pBuf & 0x7f); in decode()
111 result = ((*(pBuf + 3) & 0x7f) << 21) | ((*(pBuf + 2) & 0x7f) << 14) | in decode()
112 ((*(pBuf + 1) & 0x7f) << 7) | (*pBuf & 0x7f); in decode()
115 if ((*(pBuf + 3) & 0x80) != 0) { in decode()
122 pBuf += 4; in decode()
124 byte = *pBuf; in decode()
125 pBuf++; in decode()
136 uint64_t decode<uint64_t>(const ByteType*& pBuf) { in decode() argument
140 byte = *pBuf++; in decode()
145 byte = *pBuf++; in decode()
150 byte = *pBuf++; in decode()
155 byte = *pBuf++; in decode()
170 byte = *pBuf++; in decode()
184 int64_t decode<int64_t>(const ByteType* pBuf, size_t& pSize) { in decode() argument
191 byte = *pBuf; in decode()
192 pBuf++; in decode()
205 int64_t decode<int64_t>(const ByteType*& pBuf) { in decode() argument
211 byte = *pBuf; in decode()
212 pBuf++; in decode()