encode_NUMBER32 function
dynamic
encode_NUMBER32(
- dynamic v
Convert a signed number between -(2^31) and +(2^31-1) to a five-byte value. This is useful if you want to be sure you always use four bytes, at the expense of wasting a few bytes for smaller numbers. @param {number} @returns {Array}
Implementation
encode_NUMBER32(v) {
return [29, (v >> 24) & 0xFF, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF];
}