var
tmpFileStream: TFileStream;
tmpData: array of Byte;
begin
tmpFileStream := TFileStream.Create('c:/tmp.dat', fmOpenReadWrite);
try
SetLength(tmpData, tmpFileStream.Size);
tmpFileStream.Read(tmpData, tmpFileStream.Size);
for i := 0 to Length(tmpData) - 1 do
tmpData := not tmpData;
{ tmpData中就是取反后的数据 }
finally
en;d
end;