Added endianness param per Oscar's comments.