Ascii85
基本的な考え方 > 変換例

Thomas Hobbes の Leviathan からの引用
この文章をAscii85で変換すると以下の文章となる。
ただし "<~" と "~>" は開始と終了を表す
<~9jqo^BlbD-BleB1DJ+*+F(f,q/0JhKF<GL>Cj@.4Gp$d7F!,L7@<6@)/0JDEF<G%<+EV:2F!,
O<DJ+*.@<*K0@<6L(Df-\0Ec5e;DffZ(EZee.Bl.9pF"AGXBPCsi+DGm>@3BB/F*&OCAfu2/AKY
i(DIb:@FD,*)+C]U=@3BN#EcYf8ATD3s@q?d$AftVqCh[NqF<G:8+EV:.+Cf>-FD5W8ARlolDIa
l(DId<j@<?3r@:F%a+D58'ATD4$Bl@l3De:,-DJs`8ARoFb/0JMK@qB4^F!,R<AKZ&-DfTqBG%G
>uD.RTpAKYo'+CT/5+Cei#DII?(E,9)oF*2M7/c~>
変換過程
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Text content   | M  | M  | M  | M  | M  | M  | M  | M  | a  | a  | a  | a  | a  | a  | a  | a  | n  | n  | n  | n  | n  | n  | n  | n  |    |    |    |    |    |    |    |    | ...   | s  | s  | s  | s  | s  | s  | s  | s  | u  | u  | u  | u  | u  | u  | u  | u  | r  | r  | r  | r  | r  | r  | r  | r  | e  | e  | e  | e  | e  | e  | e  | e  |
| ASCII   | 77   | 77   | 77   | 77   | 77   | 77   | 77   | 77   | 97   | 97   | 97   | 97   | 97   | 97   | 97   | 97   | 110   | 110   | 110   | 110   | 110   | 110   | 110   | 110   | 32   | 32   | 32   | 32   | 32   | 32   | 32   | 32   | ...   | 115   | 115   | 115   | 115   | 115   | 115   | 115   | 115   | 117   | 117   | 117   | 117   | 117   | 117   | 117   | 117   | 114   | 114   | 114   | 114   | 114   | 114   | 114   | 114   | 101   | 101   | 101   | 101   | 101   | 101   | 101   | 101   |
| Bit pattern | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0   | ... | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1   |
| 32-bit Value   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | 1,298,230,816 = 24×854 + 73×853 + 80×852 + 78×85 + 61   | ...   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   | 1,937,076,837 = 37×854 + 9×853 + 17×852 + 44×85 + 22   |
| Base 85 (+33)   | 24 (57)   | 24 (57)   | 24 (57)   | 24 (57)   | 24 (57)   | 24 (57)   | 73 (106)   | 73 (106)   | 73 (106)   | 73 (106)   | 73 (106)   | 73 (106)   | 73 (106)   | 80 (113)   | 80 (113)   | 80 (113)   | 80 (113)   | 80 (113)   | 80 (113)   | 78 (111)   | 78 (111)   | 78 (111)   | 78 (111)   | 78 (111)   | 78 (111)   | 78 (111)   | 61 (94)   | 61 (94)   | 61 (94)   | 61 (94)   | 61 (94)   | 61 (94)   | ...   | 37 (70)   | 37 (70)   | 37 (70)   | 37 (70)   | 37 (70)   | 37 (70)   | 9 (42)   | 9 (42)   | 9 (42)   | 9 (42)   | 9 (42)   | 9 (42)   | 9 (42)   | 17 (50)   | 17 (50)   | 17 (50)   | 17 (50)   | 17 (50)   | 17 (50)   | 44 (77)   | 44 (77)   | 44 (77)   | 44 (77)   | 44 (77)   | 44 (77)   | 44 (77)   | 22 (55)   | 22 (55)   | 22 (55)   | 22 (55)   | 22 (55)   | 22 (55)   |
| ASCII   | 9   | 9   | 9   | 9   | 9   | 9   | j   | j   | j   | j   | j   | j   | j   | q   | q   | q   | q   | q   | q   | o   | o   | o   | o   | o   | o   | o   | ^   | ^   | ^   | ^   | ^   | ^   | ...   | F   | F   | F   | F   | F   | F   | *   | *   | *   | *   | *   | *   | *   | 2   | 2   | 2   | 2   | 2   | 2   | M   | M   | M   | M   | M   | M   | M   | 7   | 7   | 7   | 7   | 7   | 7   |
最後の4バイトは対応する文字がない部分があるため、0埋めを行う。
Since the last 4-tuple is incomplete, it must be padded with three zero bytes:
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Text content   | .  | .  | .  | .  | .  | .  | .  | .  | \0  | \0  | \0  | \0  | \0  | \0  | \0  | \0  | \0  | \0  | \0  | \0  | \0  | \0  | \0  | \0  | \0  | \0  | \0  | \0  | \0  | \0  | \0  | \0  |
| ASCII   | 46   | 46   | 46   | 46   | 46   | 46   | 46   | 46   | 0   | 0   | 0   | 0   | 0   | 0   | 0   | 0   | 0   | 0   | 0   | 0   | 0   | 0   | 0   | 0   | 0   | 0   | 0   | 0   | 0   | 0   | 0   | 0   |
| Bit pattern | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0   |
32-bit Value  : 771,751,936 = 14×854 + 66×853 + 56×852 + 74×85 + 46  
| Base 85 (+33)   | 14 (47)   | 14 (47)   | 14 (47)   | 14 (47)   | 14 (47)   | 14 (47)   | 66 (99)   | 66 (99)   | 66 (99)   | 66 (99)   | 66 (99)   | 66 (99)   | 66 (99)   | 56 (89)   | 56 (89)   | 56 (89)   | 56 (89)   | 56 (89)   | 56 (89)   | 74 (107)   | 74 (107)   | 74 (107)   | 74 (107)   | 74 (107)   | 74 (107)   | 74 (107)   | 46 (79)   | 46 (79)   | 46 (79)   | 46 (79)   | 46 (79)   | 46 (79)   |
| ASCII   | /   | /   | /   | /   | /   | /   | c   | c   | c   | c   | c   | c   | c   | Y  | Y  | Y  | Y  | Y  | Y  | k  | k  | k  | k  | k  | k  | k  | O  | O  | O  | O  | O  | O  |
3バイトが0埋めされているため、最後の 'YkO'は出力しない。
復号は逆操作を行う。ただし、最後の5文字だけは 'u' で埋めて計算する。
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| ASCII   | /   | /   | /   | /   | /   | /   | c   | c   | c   | c   | c   | c   | c   | u  | u  | u  | u  | u  | u  | u  | u  | u  | u  | u  | u  | u  | u  | u  | u  | u  | u  | u  |
| Base 85 (+33)   | 14 (47)   | 14 (47)   | 14 (47)   | 14 (47)   | 14 (47)   | 14 (47)   | 66 (99)   | 66 (99)   | 66 (99)   | 66 (99)   | 66 (99)   | 66 (99)   | 66 (99)   | 84 (117)   | 84 (117)   | 84 (117)   | 84 (117)   | 84 (117)   | 84 (117)   | 84 (117)   | 84 (117)   | 84 (117)   | 84 (117)   | 84 (117)   | 84 (117)   | 84 (117)   | 84 (117)   | 84 (117)   | 84 (117)   | 84 (117)   | 84 (117)   | 84 (117)   |
32-bit Value  : 771,955,124 = 14×854 + 66×853 + 84×852 + 84×85 + 84  
| Bit pattern | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0   |
| ASCII   | 46   | 46   | 46   | 46   | 46   | 46   | 46   | 46   | 3   | 3   | 3   | 3   | 3   | 3   | 3   | 3   | 25   | 25   | 25   | 25   | 25   | 25   | 25   | 25   | 180   | 180   | 180   | 180   | 180   | 180   | 180   | 180   |
| Text content   | .  | .  | .  | .  | .  | .  | .  | .  | [ ETX ]  | [ ETX ]  | [ ETX ]  | [ ETX ]  | [ ETX ]  | [ ETX ]  | [ ETX ]  | [ ETX ]  | [ EM ]  | [ EM ]  | [ EM ]  | [ EM ]  | [ EM ]  | [ EM ]  | [ EM ]  | [ EM ]  | ´ (Extended ASCII)  | ´ (Extended ASCII)  | ´ (Extended ASCII)  | ´ (Extended ASCII)  | ´ (Extended ASCII)  | ´ (Extended ASCII)  | ´ (Extended ASCII)  | ´ (Extended ASCII)  |
入力の最後は 'u' で埋めたため、出力の最後の3バイトは無視し、原文のピリオドまでを復号結果とする。
入力に '0' のみのブロックが存在しないため、今回のAscii85では 'z' は現れない。