* Returns u32. * @returns {number} U32
()
| 294 | * @returns {number} U32 |
| 295 | */ |
| 296 | readU32() { |
| 297 | // fast path avoids allocating a 4-byte view per length read |
| 298 | if (this.isInCurrentBuffer(I32_SIZE)) { |
| 299 | const value = |
| 300 | /** @type {Buffer} */ |
| 301 | (this.currentBuffer).readUInt32LE(this.currentPosition); |
| 302 | this.currentPosition += I32_SIZE; |
| 303 | this.checkOverflow(); |
| 304 | return value; |
| 305 | } |
| 306 | return this.read(I32_SIZE).readUInt32LE(0); |
| 307 | } |
| 308 | |
| 309 | /** |
| 310 | * Pushes the lowest n bits of data as booleans. |
no test coverage detected