使用 Base64 编码有什么好处? [英] What is the advantage of using Base64 encoding?

查看:28
本文介绍了使用 Base64 编码有什么好处?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Base64 编码有什么好处?

What is the advantage of using Base64 encode?

我想更好地理解它.我真的需要吗?我不能简单地使用纯字符串吗?

I would like to understand it better. Do I really need it? Can't I simply use pure strings?

我听说编码最多可以比原始编码大 30%(至少对于图像而言).

I heard that the encoding can be up to 30% larger than the original (at least for images).

推荐答案

原来有些协议只允许 7 位数据,有时只允许 6 位数据.

Originally some protocols only allowed 7 bit, and sometimes only 6 bit, data.

Base64 允许将 8 位数据编码为 6 位,以便在这些类型的链路上传输.

Base64 allows one to encode 8 bit data into 6 bits for transmission on those types of links.

电子邮件就是一个例子.

Email is an example of this.

这篇关于使用 Base64 编码有什么好处?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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