Pregunta

For instance jpeg (JFIF) has a SOI (start of image) marker. One can argue that it can be used to identify the type of file, but I'm looking for more sound reason with supporting examples.

¿Fue útil?

Solución

These are often referred to as "signature bytes" and their primary purpose is simply to aide in validating the file. Some file types contain additional signature bytes elsewhere in the file (ie: BMP format), and some contain none at all. The latter kind still generally provide some other means to validate the file using a variety of techniques, such as checksums, stored file size and the like.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top