* Reads some data from the stream. Note that this function might read less * data than what was requested. Use `Load` function if you want to read as * much data as possible. * * @param buf Buffer to read into. * @param len Number of bytes to read. * @returns Number of bytes that were actually read.
| 37 | * A return value of zero signals end of stream. |
| 38 | */ |
| 39 | inline size_t Read(void* buf, size_t len) { |
| 40 | if (len == 0) { |
| 41 | return 0; |
| 42 | } |
| 43 | |
| 44 | return DoRead(buf, len); |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Reads one character from the stream. |
no outgoing calls