File formats
2. File structure
Data stored within a file is rarely just a random heap of bits and bytes. Data stored within a file usually has a structure and organization. This organization is called the file format.
For example a list might be stored within the file. An efficient way to store this list would be to have each data item stored next to each other within the file so it can be retrieved as efficiently as possible.
It is up to the programmer to decide how to organise data within a custom file.
But a lot of the time, programmers will use an industry standard file format. This has a number of advantages
- Other software will be able to handle the file. For example there are thousands of software packages that can handle the Acrobat PDF file format
- The programmer does not waste time re-inventing the wheel - it is much easier to use a standard file format than to create your own.
The file format is set down by the company or organisation that created it. For example the PDF file format is provided as public information by its inventor Adobe.