title: Searching for strings in big binary files
body: <p>I have a big binary file (1 MB &lt; size &lt; 50 MB). I need to search for a string and extract the subsequent four bytes (which is the {size,offset} of actual data in another file). What is the most efficient way to do it so that the search would be fastest?</p>
  
  <p>EDIT: The strings in the index files are in sorted order.</p>