(offset = 0)
| 96 | |
| 97 | // Read integers. |
| 98 | function readBigUInt64LE(offset = 0) { |
| 99 | validateNumber(offset, 'offset'); |
| 100 | const first = this[offset]; |
| 101 | const last = this[offset + 7]; |
| 102 | if (first === undefined || last === undefined) |
| 103 | boundsError(offset, this.length - 8); |
| 104 | |
| 105 | const lo = first + |
| 106 | this[++offset] * 2 ** 8 + |
| 107 | this[++offset] * 2 ** 16 + |
| 108 | this[++offset] * 2 ** 24; |
| 109 | |
| 110 | const hi = this[++offset] + |
| 111 | this[++offset] * 2 ** 8 + |
| 112 | this[++offset] * 2 ** 16 + |
| 113 | last * 2 ** 24; |
| 114 | |
| 115 | return BigInt(lo) + (BigInt(hi) << 32n); |
| 116 | } |
| 117 | |
| 118 | function readBigUInt64BE(offset = 0) { |
| 119 | validateNumber(offset, 'offset'); |
nothing calls this directly
no test coverage detected
searching dependent graphs…