白头发多吃什么食物能变黑| 滴虫性阴道炎用什么药| 呼吸道感染用什么药| hpv感染什么症状| 男人为什么离不开情人| 下身有点刺痛什么原因| 刘强东属什么生肖| 五指毛桃有什么功效| 孕妇吸二手烟对胎儿有什么影响| 榆钱是什么| sy什么意思| 萨德事件是什么意思| 梦见着火了是什么意思| 窦性心律不齐是什么情况| 软组织挫伤用什么药| 唯我独尊是什么生肖| 钙片什么时候吃最好| 黄体期是什么| 不成敬意什么意思| 梅毒螺旋体抗体是什么意思| 公安局跟派出所有什么区别| 乙肝五项第二项阳性是什么意思| 血压低有什么症状表现| 梦见前夫是什么兆头| 胃不好吃什么养胃水果| 1992年出生的是什么命| 蓬头垢面是什么意思| 鼻涕带血是什么原因引起的| 吃什么可以去湿气| 三个直念什么| 抗体弱阳性是什么意思| 县宣传部长是什么级别| 阴阳双补用什么药最佳| xo是什么意思| 吕洞宾属什么生肖| 桃花什么生肖| 蚊子喜欢什么血型| 什么是出马| 莲子有什么功效和作用| 王秋儿和王冬儿什么关系| 夏天为什么热| 门对门有什么说法| 尿酸高都有什么症状| 枸杞泡水喝有什么功效| 虾跟什么不能一起吃| 小孩为什么会细菌感染| 大便不成形是什么原因造成的| 禅宗是什么意思| 松茸有什么功效| 工资5k是什么意思| 长焦是什么意思| 肝的作用和功能是什么| 青岛是什么省| 朝鲜和韩国是什么关系| 大姨妈量少是什么原因| 什么皮肤病会传染| 牡丹是什么植物| 孙权与孙策是什么关系| 芹菜不能和什么食物一起吃| 走路出汗多是什么原因| 结婚长明灯有什么讲究| 日希是什么字| 疱疹用什么药膏最有效| 怕金森是什么症状| 脱发是什么病| 117是什么意思| 分辨率dpi是什么意思| 增生性贫血是什么意思| 长颈鹿代表什么生肖| 什么是辐照食品| 稷字五行属什么| 补牙挂什么科| 头癣用什么药膏最好| 澄面粉是什么面粉| 腰肌劳损是什么意思| 偷鸡不成蚀把米是什么意思| 息肉样病变是什么意思| 坐骨神经痛吃什么药好得快| 羊肉饺子馅配什么蔬菜最好吃| w代表什么单位| 精血是什么| 家里停电打什么电话| 住院需要带什么东西| 肛门潮湿用什么药最好| 香芋是什么| 糜烂型脚气用什么药最好| 什么是玄学| 99新是什么意思| 肚脐右侧是什么器官| 乳腺增生的前兆是什么| 早上嘴苦是什么原因| 人为什么要火化| 肚子里的蛔虫是什么意思| 丝光棉是什么面料| 乳头瘤病毒是什么意思| 广西属于什么地区| 碱性磷酸酶是什么| 老豆腐和嫩豆腐有什么区别| 腰背疼痛挂什么科| 鬼节为什么不能出去| 月子中心需要什么资质| 你喜欢什么动物| 梦到拉粑粑是什么意思| 点心是什么意思| 珂字五行属什么| 上嘴唇长痘痘是什么原因| 鱼香肉丝为什么叫鱼香肉丝| 做空是什么意思啊| 初潮什么意思| 数农是什么| 阴道是什么样的| 钠对人体有什么作用| 手掌发红是什么病| 属虎男和什么属相最配| 发冷发热是什么原因| gm什么意思| 脚气是什么菌引起的| 肝实质回声欠均匀是什么意思| 医学五行属什么| 安宫牛黄丸什么时候吃| 吓着了有什么症状| 鹿象征什么寓意| 8月10号什么星座| 晚上睡不着白天睡不醒是什么原因| 清歌是什么意思| 梦见手机坏了是什么意思| 什么能养肝| 仔是什么意思| 屑是什么意思| 芒果有什么好处和坏处| 小孩铅过高有什么症状| 孩子脾虚内热大便干吃什么药| hpv和tct有什么区别| 勃起功能障碍吃什么药| 肽是什么意思| 尿潜血阳性是什么意思| 什么是焦虑| 7.16什么星座| 1988是什么生肖| 翡翠和玉的区别是什么| 喇叭裤配什么上衣| 一见倾心什么意思| 术后引流管什么时间可以拔| 康复科是主要治疗什么| 天龙八部是什么朝代| 小白龙叫什么| 微信转账为什么要验证码| 袁绍和袁术是什么关系| 舌苔发白是什么症状| 尿液有白色絮状物是什么原因| 血细胞分析是查什么的| 银耳汤有什么功效| 苦瓜什么人不能吃| 牛肚是牛的什么部位| 婴儿大便有泡沫是什么原因| 抑郁气滞是什么症状| 汗味重是什么原因| 51是什么意思| 甲功不正常有什么表现| 颈椎钙化是什么意思| 谛听是什么| 为什么不能在一起| sorona是什么面料| 巴特尔是什么意思| 脚底板发红是什么原因| 糖类抗原ca199偏高是什么原因| 美味佳肴是什么意思| 十月二十二是什么星座| 心脏早搏有什么危害| 学生吃什么补脑子增强记忆力最快| 94年属于什么生肖| 1955年出生属什么| 值神天刑是什么意思| 大米发霉是什么样子| 什么是白肺| rpe是什么意思| 烫伤擦什么药膏| 脚气吃什么维生素| 特需门诊是什么意思| 手麻胳膊麻是什么原因引起的| 诺五行属什么| 梦见别人受伤流血是什么预兆| 血压高什么原因| 什么生水| 拔罐出水泡是什么原因| 女生补肾吃什么| 先敬罗衣后敬人是什么意思| 命根子是什么生肖| 男生适合学什么专业| 李耳为什么叫老子| 物上代位性是什么意思| 1998属什么生肖| co2cp在医学上是什么| 结扎后需要注意什么| 垂问是什么意思| 美丽的近义词是什么| 命里有时终须有命里无时莫强求什么意思| 肝郁症是什么病| 广州有什么美食| 什么是偏印| 肛塞是什么| 黄瓜籽粉有什么功效| 李子树苗什么品种好| 澳大利亚说什么语| 吃什么补精子| 夹生是什么意思| 张柏芝什么星座| 胃经当令是什么时辰| 什么能什么力| 1989属什么| 红细胞高是什么意思| 松针泡水喝有什么功效| 用字五行属什么| bpo是什么意思| 混油皮是什么意思| 阴囊湿疹用什么药效果最好| 1989年是什么蛇| 汗疱疹是什么| 脸上长疣是什么原因| 拔罐颜色深浅代表什么| 左眉上方有痣代表什么| 1998年出生属什么生肖| 穿刺是检查什么的| 贫血缺什么| 985和211是什么意思| 北极为什么没有企鹅| 胸口堵得慌是什么原因| 吃什么健脾胃除湿气| 钾在人体中起什么作用| 无法无天是什么生肖| 为什么要做包皮手术| 心肌供血不足用什么药| 硫黄是什么| 冬是什么生肖| 87属什么生肖| 男生做爱什么感觉| 太阳穴凹陷是什么原因| 船只是什么意思| 更年期吃什么药| 女性得疱疹是什么症状| 毛豆是什么豆| 总是出汗是什么原因| 近视眼睛什么牌子好| 梦见自己生了个女儿是什么预兆| 瓤是什么意思| 橘子什么时候成熟| 谷草谷丙偏高是什么意思| 皮角是什么病| 水瓶女和什么星座最配| 做什么来钱快| 我国的国球是什么球| 看脑血管挂什么科| 跳蚤长什么样子图片| 叻叻猪是什么意思| 吃什么对眼睛近视好| 猫咪的胡子有什么作用| 巴宝莉是什么品牌| 万宝龙属于什么档次| 大礼是什么意思| 盐和醋泡脚有什么好处| 小孩早上起床咳嗽是什么原因| 局长是什么级别干部| 1967属什么生肖| 晏字五行属什么| 百度Jump to content

白血病是什么原因引起的

From Wikipedia, the free encyclopedia
百度 这与银行优势形成互补,双方合作能够共同构建新的金融服务模式,更好的服务实体经济。

A binary-to-text encoding is encoding of data in plain text. More precisely, it is an encoding of binary data in a sequence of printable characters. These encodings are necessary for transmission of data when the communication channel does not allow binary data (such as email or NNTP) or is not 8-bit clean. PGP documentation (RFC 9580) uses the term "ASCII armor" for binary-to-text encoding when referring to Base64.

Overview

[edit]

The basic need for a binary-to-text encoding comes from a need to communicate arbitrary binary data over preexisting communications protocols that were designed to carry only English language human-readable text. Those communication protocols may only be 7-bit safe (and within that avoid certain ASCII control codes), and may require line breaks at certain maximum intervals, and may not maintain whitespace. Thus, only the 94 printable ASCII characters are "safe" to use to convey data.

Description

[edit]

The ASCII text-encoding standard uses 7 bits to encode characters. With this it is possible to encode 128 (i.e. 27) unique values (0–127) to represent the alphabetic, numeric, and punctuation characters commonly used in English, plus a selection of Control characters which do not represent printable characters. For example, the capital letter A is represented in 7 bits as 100 00012, 0x41 (1018) , the numeral 2 is 011 00102 0x32 (628), the character } is 111 11012 0x7D (1758), and the Control character RETURN is 000 11012 0x0D (158).

In contrast, most computers store data in memory organized in eight-bit bytes. Files that contain machine-executable code and non-textual data typically contain all 256 possible eight-bit byte values. Many computer programs came to rely on this distinction between seven-bit text and eight-bit binary data, and would not function properly if non-ASCII characters appeared in data that was expected to include only ASCII text. For example, if the value of the eighth bit is not preserved, the program might interpret a byte value above 127 as a flag telling it to perform some function.

It is often desirable, however, to be able to send non-textual data through text-based systems, such as when one might attach an image file to an e-mail message. To accomplish this, the data is encoded in some way, such that eight-bit data is encoded into seven-bit ASCII characters (generally using only alphanumeric and punctuation characters—the ASCII printable characters). Upon safe arrival at its destination, it is then decoded back to its eight-bit form. This process is referred to as binary to text encoding. Many programs perform this conversion to allow for data-transport, such as PGP and GNU Privacy Guard.

Encoding plain text

[edit]

Binary-to-text encoding methods are also used as a mechanism for encoding plain text. For example:

  • Some systems have a more limited character set they can handle; not only are they not 8-bit clean, some cannot even handle every printable ASCII character.
  • Other systems have limits on the number of characters that may appear between line breaks, such as the "1000 characters per line" limit of some Simple Mail Transfer Protocol software, as allowed by RFC 2821.
  • Still others add headers or trailers to the text.
  • A few poorly-regarded but still-used protocols use in-band signaling, causing confusion if specific patterns appear in the message. The best-known is the string "From " (including trailing space) at the beginning of a line, used to separate mail messages in the mbox file format.

By using a binary-to-text encoding on messages that are already plain text, then decoding on the other end, one can make such systems appear to be completely transparent. This is sometimes referred to as 'ASCII armoring'. For example, the ViewState component of ASP.NET uses base64 encoding to safely transmit text via HTTP POST, in order to avoid delimiter collision.

Encoding standards

[edit]

The table below compares the most used forms of binary-to-text encodings. The efficiency listed is the ratio between the number of bits in the input and the number of bits in the encoded output.

Encoding Data type Efficiency Programming language implementations Comments
Ascii85 Arbitrary 80% awk Archived 2025-08-05 at the Wayback Machine, C, C (2), C#, F#, Go, Java Perl, Python, Python (2) There exist several variants of this encoding, Base85, btoa, etc.
Base32 Arbitrary 62.5% ANSI C, Delphi, Go, Java, C# F#, Python  
Base36 Integer ~64% bash, C, C++, C#, Java, Perl, PHP, Python, Visual Basic, Swift, many others Uses the Arabic numerals 0–9 and the Latin letters A–Z (the ISO basic Latin alphabet). Commonly used by URL redirection systems like TinyURL or SnipURL/Snipr as compact alphanumeric identifiers.
Base45 Arbitrary ~67% (97%[a]) Go, Python Defined in IETF Specification RFC 9285 for including binary data compactly in a QR code.[1]
Base56 Integer PHP, Python, Go A variant of Base58 encoding which further sheds the '1' and the lowercase 'o' characters in order to minimise the risk of fraud and human-error.[2]
Base58 Integer ~73% C, C++, Python, C#, Java Similar to Base64, but modified to avoid both non-alphanumeric characters (+ and /) and letters that might look ambiguous when printed (0 – zero, I – capital i, O – capital o and l – lower-case L). Base58 is used to represent bitcoin addresses.[citation needed] Some messaging and social media systems break lines on non-alphanumeric strings. This is avoided by not using URI reserved characters such as +. For SegWit, it was replaced by Bech32, see below.
Base58 in the original bitcoin source code
Base62 Arbitrary ~74% Rust, Python Similar to Base64, but contains only alphanumeric characters.
Base64 Arbitrary 75% awk Archived 2025-08-05 at the Wayback Machine, C, C (2), Delphi, Go, Python, many others An early and still-popular encoding, first specified as part of RFC 989 in 1987
Base85 Arbitrary 80% C, Python, Python (2) Revised version of Ascii85.
Base91[3] Arbitrary 81% C# F# Constant width variant
basE91[4] Arbitrary 81% C, Java, PHP, 8086 Assembly, AWK C#, F#, Rust Variable width variant
Base94[5] Arbitrary 82% Python, C, Rust  
Base122[6] Arbitrary 87.5% JavaScript, Python, Java, Base125 Python and Javascript, Go, C  
BaseXML[7] Arbitrary 83.5% C Python JavaScript  
Bech32 Arbitrary 62.5% + at least 8 chars (label, separator, 6-char ECC) C, C++, JavaScript, Go, Python, Haskell, Ruby, Rust Specification.[8] Used in Bitcoin and the Lightning Network.[9] The data portion is encoded like Base32 with the possibility to check and correct up to 6 mistyped characters using the 6-character BCH code at the end, which also checks/corrects the Human Readable Part. The Bech32m variant has a subtle change that makes it more resilient to changes in length.[10]
BinHex Arbitrary 75% Perl, C, C (2) MacOS Classic
Decimal Integer ~42% Most languages Usually the default representation for input/output from/to humans.
Hexadecimal (Base16) Arbitrary 50% Most languages Exists in uppercase and lowercase variants
Intel HEX Arbitrary ?50% C library, C++ Typically used to program EPROM, NOR flash memory chips
MIME Arbitrary See Quoted-printable and Base64 See Quoted-printable and Base64 Encoding container for e-mail-like formatting
Percent-encoding Text (URIs), Arbitrary (RFC1738) ~40%[b] (33–70%[c]) C, Python, probably many others  
Quoted-printable Text ~33–100%[d] Probably many Preserves line breaks; cuts lines at 76 characters
S-record (Motorola hex) Arbitrary 49.6% C library, C++ Typically used to program EPROM, NOR flash memory chips. 49.6% assumes 255 binary bytes per record.
Tektronix hex Arbitrary Typically used to program EPROM, NOR flash memory chips.
TxMS Arbitrary TypeScript, CLI, Dart TxMS compresses binary data into a readable text format using Binary-to-Text encoding and allows reversible conversion back to hexadecimal.
Uuencoding Arbitrary ~60% (up to 70%) Perl, C, Delphi, Java, Python, probably many others An early encoding developed in 1980 for Unix-to-Unix Copy. Largely replaced by MIME and yEnc
Xxencoding Arbitrary ~75% (similar to Uuencoding) C, Delphi Proposed (and occasionally used) as replacement for Uuencoding to avoid character set translation problems between ASCII and the EBCDIC systems that could corrupt Uuencoded data
z85 (ZeroMQ spec:32/Z85) Binary & ASCII 80% (similar to Ascii85/Base85) C (original), C#, Dart, Erlang, Go, Lua, Ruby, Rust and others Specifies a subset of ASCII similar to Ascii85, omitting a few characters that may cause program bugs (` \ " ' _ , ;). The format conforms to ZeroMQ spec:32/Z85.
RFC 1751 (S/KEY) Arbitrary 33% C,[11] Python

"A Convention for Human-readable 128-bit Keys". A series of small English words is easier for humans to read, remember, and type in than decimal or other binary-to-text encoding systems.[12] Each 64-bit number is mapped to six short words, of one to four characters each, from a public 2048-word dictionary.[11]

The 95 isprint codes 32 to 126 are known as the ASCII printable characters.

Some older and today uncommon formats include BOO, BTOA, and USR encoding.

Most of these encodings generate text containing only a subset of all ASCII printable characters: for example, the base64 encoding generates text that only contains upper case and lower case letters, (A–Z, a–z), numerals (0–9), and the "+", "/", and "=" symbols.

Some of these encoding (quoted-printable and percent encoding) are based on a set of allowed characters and a single escape character. The allowed characters are left unchanged, while all other characters are converted into a string starting with the escape character. This kind of conversion allows the resulting text to be almost readable, in that letters and digits are part of the allowed characters, and are therefore left as they are in the encoded text. These encodings produce the shortest plain ASCII output for input that is mostly printable ASCII.

Some other encodings (base64, uuencoding) are based on mapping all possible sequences of six bits into different printable characters. Since there are more than 26 = 64 printable characters, this is possible. A given sequence of bytes is translated by viewing it as a stream of bits, breaking this stream in chunks of six bits and generating the sequence of corresponding characters. The different encodings differ in the mapping between sequences of bits and characters and in how the resulting text is formatted.

Some encodings (the original version of BinHex and the recommended encoding for CipherSaber) use four bits instead of six, mapping all possible sequences of 4 bits onto the 16 standard hexadecimal digits. Using 4 bits per encoded character leads to a 50% longer output than base64, but simplifies encoding and decoding—expanding each byte in the source independently to two encoded bytes is simpler than base64's expanding 3 source bytes to 4 encoded bytes.

Out of PETSCII's first 192 codes, 164 have visible representations when quoted: 5 (white), 17–20 and 28–31 (colors and cursor controls), 32–90 (ascii equivalent), 91–127 (graphics), 129 (orange), 133–140 (function keys), 144–159 (colors and cursor controls), and 160–192 (graphics).[13] This theoretically permits encodings, such as base128, between PETSCII-speaking machines.

See also

[edit]

Notes

[edit]
  1. ^ Encoding for QR code generation automatically selects the encoding to match the input character set, encoding 2 alphanumeric characters in 11 bits, and Base45 encodes 16 bits into 3 such characters. The efficiency is thus 32 bits of binary data encoded in 33 bits: 97%.
  2. ^ For arbitrary data; encoding all 189 non-unreserved characters with three bytes, and the remaining 66 characters with one.
  3. ^ For text; only encoding each of the 18 reserved characters.
  4. ^ One byte stored as =XX. Encoding all but the 94 characters which don't need it (incl. space and tab).

References

[edit]
  1. ^ F?ltstr?m, Patrik; Ljunggren, Freik; Gulik, Dirk-Willem van (2025-08-05). "The Base45 Data Encoding". Even in Byte mode, a typical QR code reader tries to interpret a byte sequence as text encoded in UTF-8 or ISO/IEC 8859-1. ... Such data has to be converted into an appropriate text before that text could be encoded as a QR code. ... Base45 ... offers a more compact QR code encoding.
  2. ^ Duggan, Ross (August 18, 2009). "Base-56 Integer Encoding in PHP".
  3. ^ Dake He; Yu Sun; Zhen Jia; Xiuying Yu; Wei Guo; Wei He; Chao Qi; Xianhui Lu. "A Proposal of Substitute for Base85/64 – Base91" (PDF). International Institute of Informatics and Systemics.
  4. ^ "binary to ASCII text encoding". basE91. SourceForge. Retrieved 2025-08-05.
  5. ^ "Convert binary data to a text with the lowest overhead". Vorakl's notes. April 18, 2020.
  6. ^ Albertson, Kevin (Nov 26, 2016). "Base-122 Encoding".
  7. ^ "BaseXML - for XML1.0+". GitHub. 16 March 2019.
  8. ^ "bitcoin/bips". GitHub. 8 December 2021.
  9. ^ Rusty Russell; et al. (2025-08-05). "Payment encoding in the Lightning RFC repo". GitHub.
  10. ^ "Bech32m format for v1+ witness addresses". GitHub. 5 December 2021.
  11. ^ a b RFC 1760 "The S/KEY One-Time Password System".
  12. ^ RFC 1751 "A Convention for Human-Readable 128-bit Keys"
  13. ^ "Commodore 64 PETSCII codes". sta.c64.org.
什么是超标电动车 大熊猫是什么科 大名鼎鼎的鼎是什么意思 肌瘤和囊肿有什么区别 blush是什么颜色
9527什么意思 中暑吃什么水果 爱吃甜食是缺乏什么 为什么肚子老是胀气 滔滔不绝的绝是什么意思
有机酸是什么 菠萝与凤梨有什么区别 艺字五行属什么 处女座的幸运数字是什么 大保健是什么
bml是什么意思 鳌是什么意思 套马的汉子你威武雄壮是什么歌 2024年是属什么生肖 丝瓜不能和什么食物一起吃
嫂夫人什么意思bjhyzcsm.com 鼠标cpi是什么意思hcv9jop4ns7r.cn 为什么广西女孩子好娶gysmod.com 发烧反反复复是什么原因hcv7jop9ns6r.cn 中暑了喝什么hcv8jop7ns2r.cn
肚脐两边疼是什么原因wmyky.com 红细胞是什么hcv8jop0ns1r.cn 十滴水泡脚有什么好处hcv9jop4ns0r.cn 嗯嗯什么意思0735v.com 黄瓜含有什么营养成分hcv8jop4ns9r.cn
腊肉炒什么菜最好吃hcv8jop9ns9r.cn 白浆是什么hcv9jop3ns8r.cn 茄子有什么功效和作用hcv8jop3ns8r.cn 218号是什么星座hcv8jop0ns8r.cn 头晕喝什么饮料hcv7jop6ns2r.cn
龙王庙是指什么生肖hcv9jop3ns8r.cn media是什么意思hcv8jop0ns8r.cn 汗蒸和桑拿有什么区别hcv7jop9ns3r.cn 死而什么什么hcv8jop6ns2r.cn 为什么会得肿瘤hcv8jop3ns2r.cn
百度