Basically I've read in 5 bytes that correspond to a quantity, but I would like to convert it to a Word64. What's the best way to do this?
Edit: I should also say that this is run in an inner loop so performance is critical. Ideally I'd like to do something like:
uint64_t word = 0;
char bytes[5] = getbytes(5)
word += (bytes[0] << 32)
+ (bytes[1] << 24)
+ (bytes[2] << 16)
+ (bytes[3] << 8)
+ (bytes[4])
Or something similar.