How to calculate IPFS multihash from the result of "ipfs cat"

I need to validate the authenticity of the file which I get using “ipfs cat”. I prefer to not trust ipfs client, so I want to validate the hash by myself.
My question is following: How to compose the full “block” from which IPFS multihash is calculated?