MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / GetLengthPrefixedSlice

Function GetLengthPrefixedSlice

src/leveldb/util/coding.cc:172–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172const char* GetLengthPrefixedSlice(const char* p, const char* limit,
173 Slice* result) {
174 uint32_t len;
175 p = GetVarint32Ptr(p, limit, &len);
176 if (p == NULL) return NULL;
177 if (p + len > limit) return NULL;
178 *result = Slice(p, len);
179 return p + len;
180}
181
182bool GetLengthPrefixedSlice(Slice* input, Slice* result) {
183 uint32_t len;

Callers 1

TESTFunction · 0.70

Calls 6

GetVarint32PtrFunction · 0.85
GetVarint32Function · 0.85
remove_prefixMethod · 0.80
SliceClass · 0.70
sizeMethod · 0.45
dataMethod · 0.45

Tested by 1

TESTFunction · 0.56