| 31 | #define SLICE_SIZE 1024 *16 |
| 32 | |
| 33 | int 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 | |
| 51 | void testSliceBuffer() |
| 52 | { |