inline uint32 Read4 ( uint8 *& in ) { uint8 b0 = *in++; uint8 b1 = *in++; uint8 b2 = *in++; uint8 b3 = *in++; return (b0 | (b1<<8) | (b2<<16) | (b3<<24)); }
inline uint32 Read4 (std::istream &in) { uint32 val = 0; val |= static_cast<uint32>(in.get()); val |= static_cast<uint32>(in.get()<<8); val |= static_cast<uint32>(in.get()<<16); val |= static_cast<uint32>(in.get()<<24); return val; }
inline uint32 Read4	(	uint8 *& in	)	{	uint8 b0 = *in++;	uint8 b1 = *in++;	uint8 b2 = *in++;	uint8 b3 = *in++;	return (b0 | (b1<<8) | (b2<<16) | (b3<<24));	}