byte2int

byte array to int using Big-endian or Little-endian