Delphi Xe下文件转Base64编码函数


本文整理自网络,侵删。

 

uses EncdDecd;

function EncodeFile(const FileName: string): AnsiString;
var
   stream: TMemoryStream;
begin
   stream := TMemoryStream.Create;
   try
    stream.LoadFromFile(Filename);
    result := EncodeBase64(stream.Memory, stream.Size);
   finally
    stream.Free;
   end;
end;

来源:http://www.xuexidashi.vip/h-nd-1516.html#_np=125_826

相关阅读 >>

强大的Delphi rtti--兼谈需要了解多种开发语言

Delphi cxgrid应用笔记

Delphi xe程序的主题(theme)设置

Delphi 中string字符串转换byte[]字节数组

Delphi xmldocument控件之xml

Delphi 复制文件到全盘

Delphi tstringlist utf8编码保存并开启bom

Delphi filestream

Delphi getrandompassword 生成随机密码

Delphi setformfullscreen()窗体全屏显示

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...