11 lines
341 B
Markdown
11 lines
341 B
Markdown
|
# Good to know
|
||
|
|
||
|
## 🌌 Magic numbers (5.2 PNG Signature)
|
||
|
|
||
|
Identifying file formats in binary can be a bit tricky. In fact, they are magic numbers when reading the first bytes:
|
||
|
|
||
|
- `PNG`: 0x89 0x50 0x4E 0x47 0x0D 0x0A 0x1A 0x0A
|
||
|
- `GIF`: 0x47 0x49 0x46 0x38 0x39 0x61
|
||
|
- `JPEG`: 0xFF 0xD8
|
||
|
- `ERRONEOUS_JPEG`: 0xff, 0xd9, 0xff, 0xd8, 0xff, 0xd8
|