title: Delphi Pascal - how to write data to file larger than 2 GB?
body: <p>I made a tool in Delphi to create rainbow table. It was fine until file grew up to 3.1 GB. I closed my program. Then i opened it again and it crashes while executing this code:</p>
  
  <pre><code>Assign(RainbowFile,'Rainbow_table.txt'); {assign a text file}
  Append(RainbowFile);
  </code></pre>
  
  <p>Delphi shows error "raised expection class EInOutError with message 'I/O error 131'.
  My question: how to append data to existing file bigger than 2 GB.
  // Obsolete
  Next question:
  I have currently code:</p>
  
  <pre><code>   Content_to_file := (#13+#10+Start_string+':'+hexstr(GTA_San_Andreas_CRC32(Start_string), 8));
     RainbowFile_handle.WriteBuffer( Content_to_file[1], Length(Content_to_file)*SizeOf(Char));
  </code></pre>
  
  <p>How to get rid of Content_to_file variable. I want put it directly to the WriteBuffer if it`s possible. </p>
  
  <p>EDIT:</p>
  
  <p>TFileStream works with files bigger than 2 GB. I tested it now.
  However is it possible to write so:</p>
  
  <pre><code>RainbowFile_handle.WriteBuffer( Start_string[1]+':', 
  </code></pre>
  
  <p>I mean to pass no variable argument. Or do i have definitely pass first char of variable?</p>
  
  <p>EDIT 2:</p>
  
  <p>I have currently made it this way:</p>
  
  <pre><code>    Content_to_file := (#13+#10+Start_string+':'+hexstr(GTA_San_Andreas_CRC32(Start_string), 8));
      RainbowFile_handle.WriteBuffer( Content_to_file[1], Length(Content_to_file)*SizeOf(Char));
  </code></pre>
  
  <p>Is it possible to do it without this variable?</p>