MCPcopy Create free account
hub / github.com/baidu/tera / EncodeKey

Function EncodeKey

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

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

Source from the content-addressed store, hash-verified

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

Callers 7

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

Calls 1

PutFixed32Function · 0.85

Tested by

no test coverage detected