| 108 | } |
| 109 | |
| 110 | char* EncodeVarint64(char* dst, uint64 v) { |
| 111 | static const int B = 128; |
| 112 | unsigned char* ptr = reinterpret_cast<unsigned char*>(dst); |
| 113 | while (v >= B) { |
| 114 | *(ptr++) = (v & (B - 1)) | B; |
| 115 | v >>= 7; |
| 116 | } |
| 117 | *(ptr++) = static_cast<unsigned char>(v); |
| 118 | return reinterpret_cast<char*>(ptr); |
| 119 | } |
| 120 | |
| 121 | void PutVarint64(string* dst, uint64 v) { |
| 122 | char buf[10]; |
no outgoing calls
no test coverage detected