Stream words on binary streams only read and write byte arrays. Packed binary integers can be read and written by converting to and from sequences of bytes. Floating point numbers can be read and written by converting them into a their bitwise integer representation (Floats).
There are two ways to order the bytes making up an integer; little endian byte order outputs the least significant byte first, and the most significant byte last, whereas big endian is the other way around.
Consider the hexadecimal integer 0xcafebabe. Little endian byte order yields the following sequence of bytes:
Byte:
1
2
3
4
Value:
be
ba
fe
ca
Compare this with big endian byte order:
Byte:
1
2
3
4
Value:
ca
fe
ba
be
Two words convert a sequence of bytes into an integer: