在Delphi 6中如何编码base64? [英] How to encode base64 in Delphi 6?

查看:185
本文介绍了在Delphi 6中如何编码base64?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在Delphi6中将pdf文档编码为base64。
任何人都可以帮我吗?

解决方案

您可以使用 EncdDecd 与Delphi一起提供的单元。您需要的功能是 EncodeStream 。您只需创建两个流,一个用于输入,另一个用于输出。如果您正在使用文件,那么您应该创建 TFileStream 实例。



创建两个文件流后,所有你需要的是:

  EncodeStream(InputStream,OutputStream); 


I need to encode a pdf document to base64 in Delphi6. Can anyone help me?

解决方案

You can use the EncdDecd unit that is supplied with Delphi. The function you need is EncodeStream. You simply need to create two streams, one for input and one for output. If you are working with files then you should create TFileStream instances.

Once you have your two file streams created, all you need is:

EncodeStream(InputStream, OutputStream);

这篇关于在Delphi 6中如何编码base64?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆