| 118 | } |
| 119 | |
| 120 | inline uint8_t ReadByte() |
| 121 | { |
| 122 | if (this->bufp == this->bufe) { |
| 123 | size_t len = this->reader->Read(this->buf, lengthof(this->buf)); |
| 124 | if (len == 0) SlErrorCorrupt("Unexpected end of chunk"); |
| 125 | |
| 126 | this->read += len; |
| 127 | this->bufp = this->buf; |
| 128 | this->bufe = this->buf + len; |
| 129 | } |
| 130 | |
| 131 | return *this->bufp++; |
| 132 | } |
| 133 | |
| 134 | /** |
| 135 | * Get the size of the memory dump made so far. |
no test coverage detected