我用Delphi制作了一个生成彩虹表的工具。一切都好,直到文件增长到3.1GB。我关闭了程序。然后我重新打开它,但在执行以下代码时崩溃:
Assign(RainbowFile,'Rainbow_table.txt'); {assign a text file}
Append(RainbowFile);
Delphi显示错误"raised expection class EInOutError with message 'I/O error 131'。 我的问题是:如何向大于2 GB的现有文件追加数据。 // 已过时 下一个问题: 我目前有以下代码:
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));
如何摆脱 Content_to_file 变量。如果可能的话,我想直接将其放入 WriteBuffer 中。编辑:
TFileStream 可以处理大于 2GB 的文件。我现在已经测试过了。 不过是否可能这样写:
RainbowFile_handle.WriteBuffer( Start_string[1]+':',
我的意思是不传递任何变量参数。或者我一定要传递变量的第一个字符吗?
编辑2:
我目前是这样做的:
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));
不使用这个变量是否有可能实现?