Getting rid of the backslash \ in the base85x alphabet

Escaping sucks, right? Last version of the base85x alphabet included the backslash character which is used in a bunch of popular programming languages like for example C, Java and PHP.

But we want to be able to store small binary files inside of sourcecode without taking care about escaping. Just like

$image_data = '
?%AvZOxjj)vwXPQ_*hhA2Sj~vME^X32O]TMX/0+P41T2AtZ4;ER04^WhSDqym%r;
ei,%N}}O|3b3w{WawiL4twR51zu4CEQ{OvNL/ebH:wK)KWF{x5IC.C2[Hlpq|vh9
9g/]vUEa6/,lF[YjpYrV%d2zqr5nQlp)PXzqXbWtE}]ZcN*FKK2$~YcoYK6S:W4G
^u9Yw:h^m6d.ukMTGEiCt^8?(ybvbCr,ij;QDoHTjuV(,$niJj7,);/3Mx9oVygq
%w9q*i0_pBy)Np~(/oYnO32H8t~3u+gAxF6M.YutDQ+v]Ege$UDFCb6lnAWjJ2un
DfCV.(h%f}N4YL(knk+dcy{bc%4,.],7}Uo{ox(*lRH,r.AoHi,614GxIF7?8Oy[
g_u3hyf5e?/s?/cPbvuP3VSmpIRiWgT})HmnZ*,pFE[%y*mH^rQZo]iF3P)bg0wY
Ko%){H.qQhA/GdlS^E,X}M/6Nvt{Vti2Z{k9A|C(35mc1rkml+IP,Jva6.P1Qs[f
nwAY.m}i?cyimPKMl%9Xq](WEabr77
';

Thus the base85x alphabet changed as follows:

In formular style that’s the same as

out = (char) (c1 >= 51 ? c1 + 42 : (c1 >= 22 ? c1 + 41 : (c1 >= 2 ? c1 + 39 : c1 + 36)));

0
$
1
%
2
(
3
)
4
*
5
+
6
,
7
-
8
.
9
/
10
0
11
1
12
2
13
3
14
4
15
5
16
6
17
7
18
8
19
9
20
:
21
;
22
?
23
@
24
A
25
B
26
C
27
D
28
E
29
F
30
G
31
H
32
I
33
J
34
K
35
L
36
M
37
N
38
O
39
P
40
Q
41
R
42
S
43
T
44
U
45
V
46
W
47
X
48
Y
49
Z
50
[
51
]
52
^
53
_
54
`
55
a
56
b
57
c
58
d
59
e
60
f
61
g
62
h
63
i
64
j
65
k
66
l
67
m
68
n
69
o
70
p
71
q
72
r
73
s
74
t
75
u
76
v
77
w
78
x
79
y
80
z
81
{
82
|
83
}
84
~

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.