Is this the function of a file format?

499 views

I have trouble understanding file formats, or maybe I have figured it out. Please help me!

A file format is a specification that tells how the data of a file is arranged and thus how it is to be interpreted. Does this mean, for instance, that data arranged according to a JPEG (an image format and codec) will tell my computer that the data is to be interpreted as an image?

In: 16

16 Answers

Anonymous 0 Comments

Yes. The format of the file is how the bits are arranged in a file. However, there is more (generally) to a file than the arrangement of the bits. There is most often a collection of special bits at the very beginning of a file that help the computer or program to determine what type of file it is, these are called “magic bytes”. Using the JPEG format for example, the “magic bytes” at the very beginning of the file (in hexadecimal) are “FF D8 FF EE”. When the computer reads this file it sees these bytes and says “Aha! This is a JPEG format file!” and then it knows how to follow the pattern to “read” that file format and can then display it.

You are viewing 1 out of 16 answers, click here to view all answers.