Como mesclar 2 bytes em um número inteiro

int number = buf[0] | buf[1] << 8;
Elegant Earthworm