我使用Binary到你回答的Base64函数: Binary to Base64 (Delphi) 我成功地将文件编码为base64字符串并将其写入MsSQL2008数据库,但我想问一个问题: 如何使用EncdDecd.pas将此文件再次写入磁盘? 一如
Binary to Base64 (Delphi)
我成功地将文件编码为base64字符串并将其写入MsSQL2008数据库,但我想问一个问题:
如何使用EncdDecd.pas将此文件再次写入磁盘?
procedure DecodeFile(const base64: AnsiString; const FileName: string);
var
stream: TBytesStream;
begin
stream := TBytesStream.Create(DecodeBase64(base64));
try
stream.SaveToFile(Filename);
finally
stream.Free;
end;
end;
