MCPcopy Create free account
hub / github.com/ElementsProject/elements / EncodeVarint64

Function EncodeVarint64

src/leveldb/util/coding.cc:55–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55char* EncodeVarint64(char* dst, uint64_t v) {
56 static const int B = 128;
57 uint8_t* ptr = reinterpret_cast<uint8_t*>(dst);
58 while (v >= B) {
59 *(ptr++) = v | B;
60 v >>= 7;
61 }
62 *(ptr++) = static_cast<uint8_t>(v);
63 return reinterpret_cast<char*>(ptr);
64}
65
66void PutVarint64(std::string* dst, uint64_t v) {
67 char buf[10];

Callers 1

PutVarint64Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected