#include #include #include int16_t int16_load_bigendian(const unsigned char *s) { int16_t x; memcpy(&x,s,sizeof x); return be16toh(x); }