title: Comparing bytes in Ruby
body: <p>I have a binary blob header of either a JPG or MP4 file. I am trying to differentiate between the two. </p>
  
  <p>When the file is a JPG, the first two bytes are <code>\xFF\xD8</code>. However, when I make the comparison <code>blob[0] == "\xFF"</code>, it fails. Even when I know that <code>blob[0]</code> IS in fact <code>\xFF</code></p>
  
  <p>What is the best way to do this? </p>