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

Method toBytesBE

projects/JavaScript/proto/int64.js:229–242  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

227 * @returns {!Array.<number>} Bytes representation
228 */
229 toBytesBE () {
230 let hi = this.high
231 let lo = this.low
232 return [
233 hi >>> 24 & 0xFF,
234 hi >>> 16 & 0xFF,
235 hi >>> 8 & 0xFF,
236 hi >>> 0 & 0xFF,
237 lo >>> 24 & 0xFF,
238 lo >>> 16 & 0xFF,
239 lo >>> 8 & 0xFF,
240 lo >>> 0 & 0xFF
241 ]
242 }
243
244 /**
245 * Converts the Int64 to its bytes representation (little endian)

Callers 2

toBytesMethod · 0.95
test_int64.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected