bits_to_raw: Convert between logical vector of bits and raw vector
Description
Convert between logical vector of bits and raw vector
Usage
bits_to_raw(bits, msb_first = TRUE)
raw_to_bits(x, msb_first = TRUE)
Value
Logical vector of bit values or a raw vector.
Arguments
bits
Logical vector of bit values. Length must be a multiple of 8
msb_first
MSB first? Default: TRUE
x
Byte values. Integer vectors will be truncated to 8 bits
before output. Numeric vectors will be rounded to integers and then
truncated to 8 bits. Raw vectors preferred.