- Scan QR code
- UTF-16LE
- UTF-32LE
- US-ASCII
- ISO-8859-1 (Latin-1)
- ISO-8859-15 (Latin-9)
- Windows-1252
- ISO-8859-2 (Latin-2)
- Windows-1250
- ISO-8859-3 (Latin-3)
- ISO-8859-4 (Latin-4)
- ISO-8859-13 (Latin-7)
- Windows-1257
- Shift_JIS
- EUC-JP
- ISO-2022-JP (JIS)
- GB2312 (EUC-CN)
- GB18030
- Big5-HKSCS
- EUC-KR (KS X 1001)
- ISO-2022-KR
- ISO-8859-5
- Windows-1251
- KOI8-R
- KOI8-U
- ISO-8859-6
- Windows-1256
- ISO-8859-7
- Windows-1253
- ISO-8859-8
- Windows-1255
- ISO-8859-9 (Latin-5)
- Windows-1254
- TIS-620
- Windows-874
- Windows-1258
Decoded
Ascii85 |
---|
Encoded
Ascii85 |
Variant
|
---|
About Ascii85
Ascii85 is an encoding scheme that uses 7-bit printable ASCII characters, also known as Base85.
Ascii85 divides the data into 4 bytes each and converts them into 5 ASCII characters to represent them.
There are many variants of Ascii85, and DenCode supports the following three types of Ascii85. The original being btoa, followed by Adobe and Z85.
Summary | |
---|---|
Z85 | Used by ZeroMQ." \" (backslash) and "'" (apostrophe) characters that require escaping are not used. |
Adobe | It is used to encode images and other data in Adobe's PostScript and PDF (Portable Document Format) files. It is enclosed in "<~" and "~>". |
btoa | A form of the UNIX btoa command. It was used in the past for exchanging binary data, but is no longer common. Enclosed in "xbtoa Begin" and "xbtoa End" lines. |
The ASCII characters used in Ascii85 are as follows: treat the 4-byte value as a big-endian unsigned integer, calculate each digit (5 digits) of the 85 decimal system from it, and then find the Ascii85 conversion result based on the following ASCII characters
ASCII characters | |
---|---|
Z85 | 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$# |
Adobe | !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu |
btoa | !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu (The original was from " " (space) to "t", but because some mailers excluded trailing spaces, it was later replaced by the "!" to "u" characters without spaces.) |
For example, if we convert "Hello" with Ascii85, it will look like this.
1. Separate every 4 bytes; if less than 4 bytes, end with "00" for padding.
48656C6C(16) 6F000000(16) (Hell o)
2. Every 4 bytes are treated as a big-endian unsigned integer, and the value is converted to each digit of the 85 decimal system.
48656C6C(16) = 1214606444(10) = 23 * 854 + 22 * 853 + 66 * 852 + 52 * 85 + 49
6F000000(16) = 1862270976(10) = 35 * 854 + 57 * 853 + 33 * 852 + 65 * 85 + 26
3. Convert each digit of the 85 decimal system to an ASCII character. If the end is padded with "00", the padding is excluded in the case of Adobe/Z85.
23 | 22 | 66 | 52 | 49 | 35 | 57 | 33 | 65 | 26 | ||
Z85 | n | m | = | Q | N | z | V | ||||
Adobe | 8 | 7 | c | U | R | D | Z | ||||
btoa | 8 | 7 | c | U | R | D | Z | B | b | ; |
4. The characters are all joined together to form the Ascii85 conversion result. adobe is enclosed in "<~" & "~>", with a new line every 80 characters. btoa is enclosed in "xbtoa Begin" & "xbtoa End" (including data length, checksum, etc.), with a new line every 78 characters.
Conversion result | |
---|---|
Z85 | nm=QNzV |
Adobe | <~87cURDZ~> |
btoa | xbtoa Begin 87cURDZBb; xbtoa End N 5 5 E 42 S 1f9 R a9f |
Several other contractions have been defined.
Contractions | |
---|---|
Z85 | None |
Adobe | 00000000(16) -> z |
btoa | 00000000(16) -> z 20202020(16) -> y (btoa v4.2 or later) |