> The result of get8(s) << shift is an integer, but when the shift makes the > number bigger than 2^32 the remaining bits are discarded. Putting a cast > to force the result to be 64 bits solves the problem. What about the performance? Unnecessary casts are a common source of unwanted performance problems. Best regards, Roberto