| 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 | } |
no outgoing calls