add function to convert little- resp. big-endian arrays