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

Method writeInt64

projects/JavaScript/proto/fbe.js:985–998  ·  view source on GitHub ↗

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

(offset, value)

Source from the content-addressed store, hash-verified

983 * @param {!Int64} value Int64 value
984 */
985 writeInt64 (offset, value) {
986 value = Int64.fromValue(value)
987 offset = offset >>> 0
988 offset += this._buffer.offset
989 this._buffer.checkOffset(offset, 8)
990 this._buffer.buffer[offset + 0] = (value.low & 0xFF)
991 this._buffer.buffer[offset + 1] = (value.low >>> 8)
992 this._buffer.buffer[offset + 2] = (value.low >>> 16)
993 this._buffer.buffer[offset + 3] = (value.low >>> 24)
994 this._buffer.buffer[offset + 4] = (value.high & 0xFF)
995 this._buffer.buffer[offset + 5] = (value.high >>> 8)
996 this._buffer.buffer[offset + 6] = (value.high >>> 16)
997 this._buffer.buffer[offset + 7] = (value.high >>> 24)
998 }
999
1000 /**
1001 * Write UInt64 value into the field model buffer

Callers 4

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