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

Function GetLengthPrefixedSlice

src/leveldb/db/memtable.cc:14–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12namespace leveldb {
13
14static Slice GetLengthPrefixedSlice(const char* data) {
15 uint32_t len;
16 const char* p = data;
17 p = GetVarint32Ptr(p, p + 5, &len); // +5: we assume "p" is not corrupted
18 return Slice(p, len);
19}
20
21MemTable::MemTable(const InternalKeyComparator& comparator)
22 : comparator_(comparator), refs_(0), table_(comparator_, &arena_) {}

Callers 7

operator()Method · 0.70
keyMethod · 0.70
valueMethod · 0.70
GetMethod · 0.70
IterateMethod · 0.70
GetInternalKeyFunction · 0.70
DecodeFromMethod · 0.70

Calls 2

GetVarint32PtrFunction · 0.85
SliceClass · 0.50

Tested by

no test coverage detected