JPEG (jpg), file header: ffd8ff file tail: FFD9
PNG (PNG), file header: 89504E47 end of File: AE426082
GIF (GIF), file header: 47494638 end of File: 003B
Zip Archive (Zip), file header: 504b0304 file tail: 504B
TIFF (TIF), file header: 49492a00
Windows Bitmap (BMP), file header: 424D
CAD (DWG), file header: 41433130
Adobe Photoshop (PSD), file header: 38425053
Rich Text Format (RTF), file header: 7b5c727466
XML (XML), file header: 3c3f786d6c
HTML (HTML), file header: 68746d6c3e
Email [Thorough only] (EML), file header: 44656c69766572792d646174653a
Outlook Express (DBX), file header: cfad12fec5fd746f
Outlook (PST), file header: 2142444E
MS Word/excel (xls.or.doc), file header: d0cf11e0
MS Access (MDB), file header: 5374616e64617264204a
WordPerfect (WPD), file header: FF575043
Adobe Acrobat (pdf), file header: 255044462d312e
Quicken (QDF), file header: ac9ebd8f
Windows Password (PWL), file header: E3828596
rar Archive (RAR), file header: 52617221
Wave (WAV), file header: 57415645
Avi (AVI), File header: 41564920
Real Audio (RAM), file header: 2E7261FD
Real Media (RM), file header: 2e524d46
MPEG (MPG), file header: 000001BA
MPEG (MPG), file header: 000001b3
Quicktime (mov), file header: 6d6f6f76
Windows Media (ASF), file header: 3026b2758e66cf11
MIDI (mid), file header: 4d546864
DOS (EXE), file header: 4d5a9000
From:http://www.cnblogs.com/lwy-kitty/p/3928317.html
[Go] File header format