Skip to content

Instantly share code, notes, and snippets.

View djchateau's full-sized avatar
🕳️

Daniel Chateau djchateau

🕳️
View GitHub Profile

Keybase proof

I hereby claim:

  • I am djchateau on github.
  • I am djchateau (https://keybase.io/djchateau) on keybase.
  • I have a public key whose fingerprint is 4902 911A E98B 6E33 2EEE 8BCA EBB2 5528 D169 CC8B

To claim this, I am signing this object:

#File Magic Numbers

Magic numbers are the first bits of a file which uniquely identify the type of file. This makes programming easier because complicated file structures need not be searched in order to identify the file type.

For example, a jpeg file starts with ffd8 ffe0 0010 4a46 4946 0001 0101 0047 ......JFIF.....G ffd8 shows that it's a JPEG file, and ffe0 identify a JFIF type structure. There is an ascii encoding of "JFIF" which comes after a length code, but that is not necessary in order to identify the file. The first 4 bytes do that uniquely.

This gives an ongoing list of file-type magic numbers.

##Image Files

Keybase proof

I hereby claim:

  • I am djchateau on github.
  • I am djchateau (https://keybase.io/djchateau) on keybase.
  • I have a public key ASAKb7eTmbvh1m4RLWZok_JwGY9z254JQqKL70HohRXh2Ao

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am djchateau on github.
  • I am djchateau (https://keybase.io/djchateau) on keybase.
  • I have a public key ASAhUln-UslmU4zsylbxat072n5d7-9tcc0OGfGeRLgJnAo

To claim this, I am signing this object: