MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / readAt

Method readAt

framework/data_source/cache/slice.cpp:70–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68 }
69
70 int slice::readAt(void *buffer, int size, uint64_t offset)
71 {
72 int readSize = (int) MIN(size, (int) (mSize - offset));
73
74 if (readSize > 0 && buffer != nullptr) {
75 memcpy(buffer, mBufferPtr + offset, static_cast<size_t>(readSize));
76 }
77
78 return readSize;
79 }
80}

Callers 3

readMethod · 0.45
testSliceFunction · 0.45
testSliceBufferFunction · 0.45

Calls

no outgoing calls

Tested by 2

testSliceFunction · 0.36
testSliceBufferFunction · 0.36