The file size in the image is little endian. This code stores the integer as little endian irregardless of the
machines actual endianness.
The code assumes that a character has 8 bits. The first line extracts the first byte of the integer, the
second line the next higher byte (shifting it to the right by 8 bits and cutting the rest off), the third line
the next higher bytes (shifting it right by 16, cutting the rest of) and the last line extracts the highest
byte.