Slices should work efficiently, only reading requested bytes. Something along the lines of: hfile[100:400]