title: Best way to convert Hex string file to integer
body: <p>I have 10GB of data in binary files with little endian format and I am converting them to integer like:</p>
  
  <pre><code>with open(myfile, 'rb') as inh:
      data = inh.read()
  
  for i in range(0, len(data), 4):
      pos = struct.unpack('i', data[i:i+4])
  </code></pre>
  
  <p>But it takes really long time to convert each file with 100MB of data. Is there any way to speed the process up?</p>