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

Function readSlice

framework/data_source/cache/sliceTest.cpp:33–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31#define SLICE_SIZE 1024 *16
32
33int readSlice(IDataSource *source, const uint8_t *ReadBuffer)
34{
35 int sizeRead = 0;
36 int ret;
37
38 while (sizeRead < SLICE_SIZE) {
39 ret = source->Read((void *) (ReadBuffer + sizeRead), SLICE_SIZE - sizeRead);
40
41 if (ret <= 0) {
42 break;
43 } else {
44 sizeRead += ret;
45 }
46 }
47
48 return sizeRead;
49}
50
51void testSliceBuffer()
52{

Callers 1

testSliceBufferFunction · 0.85

Calls 1

ReadMethod · 0.45

Tested by

no test coverage detected