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

Method toBytesLE

projects/JavaScript/proto/int64.js:249–262  ·  view source on GitHub ↗

* Converts the Int64 to its bytes representation (little endian) * @this {!Int64} * @returns {!Array. } Bytes representation

()

Source from the content-addressed store, hash-verified

247 * @returns {!Array.<number>} Bytes representation
248 */
249 toBytesLE () {
250 let hi = this.high
251 let lo = this.low
252 return [
253 lo >>> 0 & 0xFF,
254 lo >>> 8 & 0xFF,
255 lo >>> 16 & 0xFF,
256 lo >>> 24 & 0xFF,
257 hi >>> 0 & 0xFF,
258 hi >>> 8 & 0xFF,
259 hi >>> 16 & 0xFF,
260 hi >>> 24 & 0xFF
261 ]
262 }
263
264 /**
265 * Converts the Int64 to a 32-bit integer, assuming it is a 32-bit integer

Callers 2

toBytesMethod · 0.95
test_int64.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected