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

Function writeBigU_Int64LE

lib/internal/buffer.js:584–604  ·  view source on GitHub ↗
(buf, value, offset, min, max)

Source from the content-addressed store, hash-verified

582
583// Write integers.
584function writeBigU_Int64LE(buf, value, offset, min, max) {
585 checkInt(value, min, max, buf, offset, 7);
586
587 let lo = Number(value & 0xffffffffn);
588 buf[offset++] = lo;
589 lo = lo >> 8;
590 buf[offset++] = lo;
591 lo = lo >> 8;
592 buf[offset++] = lo;
593 lo = lo >> 8;
594 buf[offset++] = lo;
595 let hi = Number(value >> 32n & 0xffffffffn);
596 buf[offset++] = hi;
597 hi = hi >> 8;
598 buf[offset++] = hi;
599 hi = hi >> 8;
600 buf[offset++] = hi;
601 hi = hi >> 8;
602 buf[offset++] = hi;
603 return offset;
604}
605
606function writeBigUInt64LE(value, offset = 0) {
607 return writeBigU_Int64LE(this, value, offset, 0n, 0xffffffffffffffffn);

Callers 2

writeBigUInt64LEFunction · 0.85
writeBigInt64LEFunction · 0.85

Calls 1

checkIntFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…