inline uint16 Read2 (std::istream &in) { uint16 val = 0; val |= static_cast<uint16>(in.get()); val |= static_cast<uint16>(in.get()<<8); return val; }
inline uint16 Read2 ( uint8 *& in ) { uint8 b0 = *in++; uint8 b1 = *in++; return (b0 | (b1 << 8)); }
inline uint16 Read2 (std::istream &in){	uint16 val = 0;	val |= static_cast<uint16>(in.get());	val |= static_cast<uint16>(in.get()<<8);	return val;}