add check for endianess in major constructors

apropos #2318