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

Function EncodeKey

src/leveldb/util/cache_test.cc:14–18  ·  view source on GitHub ↗

Conversions between numeric keys/values and the types expected by Cache.

Source from the content-addressed store, hash-verified

12
13// Conversions between numeric keys/values and the types expected by Cache.
14static std::string EncodeKey(int k) {
15 std::string result;
16 PutFixed32(&result, k);
17 return result;
18}
19static int DecodeKey(const Slice& k) {
20 assert(k.size() == 4);
21 return DecodeFixed32(k.data());

Callers 5

LookupMethod · 0.70
InsertMethod · 0.70
InsertAndReturnHandleMethod · 0.70
EraseMethod · 0.70
TESTFunction · 0.70

Calls 1

PutFixed32Function · 0.85

Tested by

no test coverage detected