| 197 | size_t remaining() const { return data.size() - offset; } |
| 198 | |
| 199 | LogicalResult readBytes(size_t length, ArrayRef<uint8_t> &result) { |
| 200 | if (offset + length > data.size()) { |
| 201 | result = ArrayRef<uint8_t>(); |
| 202 | return failure(); |
| 203 | } |
| 204 | result = data.slice(offset, length); |
| 205 | offset += length; |
| 206 | return success(); |
| 207 | } |
| 208 | |
| 209 | ArrayRef<uint8_t> readBytes(size_t length) { |
| 210 | ArrayRef<uint8_t> result; |
no test coverage detected