Read raw bytes from buffer. Sets error on bounds violation.
| 1183 | |
| 1184 | /// Read raw bytes from buffer. Sets error on bounds violation. |
| 1185 | FORY_ALWAYS_INLINE void read_bytes(void *data, uint32_t length, |
| 1186 | Error &error) { |
| 1187 | if (FORY_PREDICT_FALSE(!ensure_readable(length, error))) { |
| 1188 | return; |
| 1189 | } |
| 1190 | copy(reader_index_, length, static_cast<uint8_t *>(data)); |
| 1191 | reader_index_ += length; |
| 1192 | } |
| 1193 | |
| 1194 | /// skip bytes in buffer. Sets error on bounds violation. |
| 1195 | FORY_ALWAYS_INLINE void skip(uint32_t length, Error &error) { |
no outgoing calls