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

Method writeUInt64

projects/JavaScript/proto/fbe.js:1006–1019  ·  view source on GitHub ↗

* Write UInt64 value into the field model buffer * @this {!FieldModelBase} * @param {!number} offset Offset * @param {!UInt64} value UInt64 value

(offset, value)

Source from the content-addressed store, hash-verified

1004 * @param {!UInt64} value UInt64 value
1005 */
1006 writeUInt64 (offset, value) {
1007 value = UInt64.fromValue(value)
1008 offset = offset >>> 0
1009 offset += this._buffer.offset
1010 this._buffer.checkOffset(offset, 8)
1011 this._buffer.buffer[offset + 0] = (value.low & 0xFF)
1012 this._buffer.buffer[offset + 1] = (value.low >>> 8)
1013 this._buffer.buffer[offset + 2] = (value.low >>> 16)
1014 this._buffer.buffer[offset + 3] = (value.low >>> 24)
1015 this._buffer.buffer[offset + 4] = (value.high & 0xFF)
1016 this._buffer.buffer[offset + 5] = (value.high >>> 8)
1017 this._buffer.buffer[offset + 6] = (value.high >>> 16)
1018 this._buffer.buffer[offset + 7] = (value.high >>> 24)
1019 }
1020
1021 /**
1022 * Write float value into the field model buffer

Callers 8

setMethod · 0.80
setMethod · 0.80
setMethod · 0.80
setMethod · 0.80
setMethod · 0.80
setMethod · 0.80
setMethod · 0.80
setMethod · 0.80

Calls 2

fromValueMethod · 0.45
checkOffsetMethod · 0.45

Tested by

no test coverage detected