MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / writeUInt32

Function writeUInt32

projects/JavaScript/tests/test_decimal.js:11–18  ·  view source on GitHub ↗
(buffer, offset, value)

Source from the content-addressed store, hash-verified

9const Big = big.Big
10
11let writeUInt32 = function (buffer, offset, value) {
12 value = +value
13 offset = offset >>> 0
14 buffer[offset + 0] = (value & 0xFF)
15 buffer[offset + 1] = (value >>> 8)
16 buffer[offset + 2] = (value >>> 16)
17 buffer[offset + 3] = (value >>> 24)
18}
19
20let verifyDecimal = function (low, mid, high, negative, scale) {
21 let flags = negative ? ((scale << 16) | 0x80000000) : (scale << 16)

Callers 1

verifyDecimalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected