* Returns u8. * @returns {number} U8
()
| 276 | * @returns {number} U8 |
| 277 | */ |
| 278 | readU8() { |
| 279 | this.ensureBuffer(); |
| 280 | /** |
| 281 | * There is no need to check remaining buffer size here |
| 282 | * since {@link ReadState#checkOverflow} guarantees at least one byte remaining |
| 283 | */ |
| 284 | const byte = |
| 285 | /** @type {Buffer} */ |
| 286 | (this.currentBuffer).readUInt8(this.currentPosition); |
| 287 | this.currentPosition += I8_SIZE; |
| 288 | this.checkOverflow(); |
| 289 | return byte; |
| 290 | } |
| 291 | |
| 292 | /** |
| 293 | * Returns u32. |
no test coverage detected