Home | History | Annotate | Download | only in Support

Lines Matching full:pbuf

17 size_t encode<uint64_t>(ByteType *&pBuf, uint64_t pValue) {
24 *pBuf++ = byte;
36 size_t encode<uint32_t>(ByteType *&pBuf, uint32_t pValue) {
38 *pBuf++ = static_cast<ByteType>(pValue);
41 *pBuf++ = static_cast<ByteType>((pValue & 0x7f) | 0x80);
42 *pBuf++ = static_cast<ByteType>((pValue >> 7) & 0x7f);
45 *pBuf++ = static_cast<ByteType>((pValue & 0x7f) | 0x80);
46 *pBuf++ = static_cast<ByteType>(((pValue >> 7) & 0x7f) | 0x80);
47 *pBuf++ = static_cast<ByteType>((pValue >> 14) & 0x7f);
50 *pBuf++ = static_cast<ByteType>((pValue & 0x7f) | 0x80);
51 *pBuf++ = static_cast<ByteType>(((pValue >> 7) & 0x7f) | 0x80);
52 *pBuf++ = static_cast<ByteType>(((pValue >> 14) & 0x7f) | 0x80);
53 *pBuf++ = static_cast<ByteType>((pValue >> 21) & 0x7f);
56 *pBuf++ = static_cast<ByteType>((pValue & 0x7f) | 0x80);
57 *pBuf++ = static_cast<ByteType>(((pValue >> 7) & 0x7f) | 0x80);
58 *pBuf++ = static_cast<ByteType>(((pValue >> 14) & 0x7f) | 0x80);
59 *pBuf++ = static_cast<ByteType>(((pValue >> 21) & 0x7f) | 0x80);
60 *pBuf++ = static_cast<ByteType>((pValue >> 28) & 0x7f);
67 size_t encode<int64_t>(ByteType *&pBuf, int64_t pValue) {
81 *pBuf++ = byte;
89 size_t encode<int32_t>(ByteType *&pBuf, int32_t pValue) {
90 return encode<int64_t>(pBuf, static_cast<int64_t>(pValue));
96 uint64_t decode<uint64_t>(const ByteType *pBuf, size_t &pSize) {
99 if ((*pBuf & 0x80) == 0) {
101 return *pBuf;
102 } else if ((*(pBuf + 1) & 0x80) == 0) {
104 return ((*(pBuf + 1) & 0x7f) << 7) |
105 (*pBuf & 0x7f);
106 } else if ((*(pBuf + 2) & 0x80) == 0) {
108 return ((*(pBuf + 2) & 0x7f) << 14) |
109 ((*(pBuf + 1) & 0x7f) << 7) |
110 (*pBuf & 0x7f);
113 result = ((*(pBuf + 3) & 0x7f) << 21) |
114 ((*(pBuf + 2) & 0x7f) << 14) |
115 ((*(pBuf + 1) & 0x7f) << 7) |
116 (*pBuf & 0x7f);
119 if ((*(pBuf + 3) & 0x80) != 0) {
126 pBuf += 4;
128 byte = *pBuf;
129 pBuf++;
140 uint64_t decode<uint64_t>(const ByteType *&pBuf) {
144 byte = *pBuf++;
149 byte = *pBuf++;
154 byte = *pBuf++;
159 byte = *pBuf++;
174 byte = *pBuf++;
188 int64_t decode<int64_t>(const ByteType *pBuf, size_t &pSize) {
195 byte = *pBuf;
196 pBuf++;
209 int64_t decode<int64_t>(const ByteType *&pBuf) {
215 byte = *pBuf;
216 pBuf++;