Convert an integer to raw bytes using a 64-bit representation
Source:R/SeaSondeRCS.R
seasonder_int_to_raw.Rd
This function converts an integer to a raw byte representation using a 64-bit (8-byte) format.
It leverages the bit64
package to handle the 64-bit integer representation and conversion.
Details
The function follows these steps:
Convert the integer to a 64-bit format using
bit64::as.integer64
.Convert the 64-bit integer to a bit string.
Split the bit string into individual bits.
Reorder the bits into groups of 8, reversing the order within each group.
Convert the reordered bits back to raw bytes.