For the Little Endian/Big Endian thing, hmm, we would probably need to know more about your machine architecture (64 bits, 48 bits, 64 bits, more ?), I am not even sure you need to care about it if you use the read function (last time I had to deal with such problems was at least 6 years ago, I don't remember well enough what I had to do, except that I had to make a bit of experiment to get it right, but it was not so complicated to get it right once I understood the format). One possible clue: the h and H templates of the pack and unpack function might be what you are looking for.

I might have a quick look at it next Monday when I am back to work, where I have access to a Little Endian platform.