Added function to conveniently check for presence of fixed values.

Many binary formats have sentinel values/delimiters and binary currently does not provide a convenient way to check for these. Added a simple function that compares the parsed value with an expected value.