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

Method readInt64

projects/JavaScript/proto/fbe.js:741–756  ·  view source on GitHub ↗

* Read Int64 value from the field model buffer * @this {!FieldModelBase} * @param {!number} offset Offset * @returns {!Int64} Int64 value

(offset)

Source from the content-addressed store, hash-verified

739 * @returns {!Int64} Int64 value
740 */
741 readInt64 (offset) {
742 offset = offset >>> 0
743 offset += this._buffer.offset
744 this._buffer.checkOffset(offset, 8)
745 let low = (
746 (this._buffer.buffer[offset + 0] << 0) |
747 (this._buffer.buffer[offset + 1] << 8) |
748 (this._buffer.buffer[offset + 2] << 16) |
749 (this._buffer.buffer[offset + 3] << 24))
750 let high = (
751 (this._buffer.buffer[offset + 4] << 0) |
752 (this._buffer.buffer[offset + 5] << 8) |
753 (this._buffer.buffer[offset + 6] << 16) |
754 (this._buffer.buffer[offset + 7] << 24))
755 return new Int64(low, high)
756 }
757
758 /**
759 * Read UInt64 value from the field model buffer

Callers 4

getMethod · 0.45
getMethod · 0.45
getMethod · 0.45
getMethod · 0.45

Calls 1

checkOffsetMethod · 0.45

Tested by

no test coverage detected