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

Function writeU_Int48BE

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

Source from the content-addressed store, hash-verified

772}
773
774function writeU_Int48BE(buf, value, offset, min, max) {
775 value = +value;
776 checkInt(value, min, max, buf, offset, 5);
777
778 const newVal = MathFloor(value * 2 ** -32);
779 buf[offset++] = (newVal >>> 8);
780 buf[offset++] = newVal;
781 buf[offset + 3] = value;
782 value = value >>> 8;
783 buf[offset + 2] = value;
784 value = value >>> 8;
785 buf[offset + 1] = value;
786 value = value >>> 8;
787 buf[offset] = value;
788 return offset + 4;
789}
790
791function writeU_Int40BE(buf, value, offset, min, max) {
792 value = +value;

Callers 2

writeUIntBEFunction · 0.85
writeIntBEFunction · 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…