Best way to verify a file header
===

I'm trying to verify that a file header (metadata) has the correct info and was not corrupted.

For example:
Some one manipulates the file size in the header of an archive to exploit a zero day. How do I check that the file size is actually that size?

- What is the best way to do it?