MCPcopy Index your code
hub / github.com/nodejs/node / readBigInt64LE

Function readBigInt64LE

lib/internal/buffer.js:138–154  ·  view source on GitHub ↗
(offset = 0)

Source from the content-addressed store, hash-verified

136}
137
138function readBigInt64LE(offset = 0) {
139 validateNumber(offset, 'offset');
140 const first = this[offset];
141 const last = this[offset + 7];
142 if (first === undefined || last === undefined)
143 boundsError(offset, this.length - 8);
144
145 const val = this[offset + 4] +
146 this[offset + 5] * 2 ** 8 +
147 this[offset + 6] * 2 ** 16 +
148 (last << 24); // Overflow
149 return (BigInt(val) << 32n) +
150 BigInt(first +
151 this[++offset] * 2 ** 8 +
152 this[++offset] * 2 ** 16 +
153 this[++offset] * 2 ** 24);
154}
155
156function readBigInt64BE(offset = 0) {
157 validateNumber(offset, 'offset');

Callers

nothing calls this directly

Calls 1

boundsErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…