Salut à tous

Je sollicite votre aide pour m'aider à créer une base 255.
Je veux dire par la que je voudrait convertir un nombre (Et pas un petit hein lol) en base 255, je m’explique:

Base 255, ça veux dire convertir un nombre en une succession de de nombre qui font au minimum 0 et maximum 255.
Encore plus de détaille:

Vous connaissez tous RGB et RGBA ?
Sa fait se que je veux mais moi c'est pas 3 ou 4 paramètre que je veux mettre mais autant que je veux

Exemple:

Ici code le nombre en une succession de nombre de 0 à 255 étant chacun séparé par un point
Base255Code(9527641264516725284212950792594259419480708452617074441972012709154824575227041954471260419452954512764291..........)

Ici decode en base 255 vers un nombre normale (Base255 est un string ou chaque nombre est séparer par un point, exemple: "125.147.25.231.84.56.143.95.47.79.214.19.27.187.179.199.28..........."
Base255DeCode(Base255)

Voici un petit code d'exemple mais pas pareil que je vous est dis, c'est un prototype
Sa fonctionne très bien mais ya surement moyen de faire plus court et ensuite de pouvoir faire autrement pour mettre plus de paramètre:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
Imports System.Numerics
 
Module Module1
 
    Function DécodeBase255(ByVal A As Byte, ByVal B As Byte, ByVal C As Byte, ByVal D As Byte, ByVal E As Byte, ByVal F As Byte, ByVal G As Byte, ByVal H As Byte, ByVal I As Byte, ByVal J As Byte, ByVal K As Byte, ByVal L As Byte, ByVal M As Byte, ByVal N As Byte, ByVal O As Byte, ByVal P As Byte, ByVal Q As Byte, ByVal R As Byte, ByVal S As Byte, ByVal T As Byte, ByVal U As Byte, ByVal V As Byte, ByVal W As Byte, ByVal X As Byte, ByVal Y As Byte, ByVal Z As Byte) As BigInteger
        Return A + (B * BigInteger.Pow(256, 1)) + (C * BigInteger.Pow(256, 2)) + (D * BigInteger.Pow(256, 3)) + (E * BigInteger.Pow(256, 4)) + (F * BigInteger.Pow(256, 5)) + (G * BigInteger.Pow(256, 6)) + (H * BigInteger.Pow(256, 7)) + (I * BigInteger.Pow(256, 8)) + (J * BigInteger.Pow(256, 9)) + (K * BigInteger.Pow(256, 10)) + (L * BigInteger.Pow(256, 11)) + (M * BigInteger.Pow(256, 12)) + (N * BigInteger.Pow(256, 13)) + (O * BigInteger.Pow(256, 14)) + (P * BigInteger.Pow(256, 15)) + (Q * BigInteger.Pow(256, 16)) + (R * BigInteger.Pow(256, 17)) + (S * BigInteger.Pow(256, 18)) + (T * BigInteger.Pow(256, 19)) + (U * BigInteger.Pow(256, 20)) + (V * BigInteger.Pow(256, 21)) + (W * BigInteger.Pow(256, 22)) + (X * BigInteger.Pow(256, 23)) + (Y * BigInteger.Pow(256, 24)) + (Z * BigInteger.Pow(256, 25))
    End Function
 
    Function A(ByVal Couleur As BigInteger) As Byte
        Return BigInteger.Parse("255") And Couleur
    End Function
 
    Function B(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("65280") And Couleur) / BigInteger.Parse("256")
    End Function
 
    Function C(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("16711680") And Couleur) / BigInteger.Parse("65536")
    End Function
 
    Function D(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("4278190080") And Couleur) / BigInteger.Parse("16777216")
    End Function
 
    Function E(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("1095216660480") And Couleur) / BigInteger.Parse("4294967296")
    End Function
 
    Function F(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("280375465082880") And Couleur) / BigInteger.Parse("1099511627776")
    End Function
 
    Function G(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("71776119061217280") And Couleur) / BigInteger.Parse("281474976710656")
    End Function
 
    Function H(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("18374686479671623680") And Couleur) / BigInteger.Parse("72057594037927936")
    End Function
 
    Function I(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("4703919738795935662080") And Couleur) / BigInteger.Parse("18446744073709551616")
    End Function
 
    Function J(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("1204203453131759529492480") And Couleur) / BigInteger.Parse("4722366482869645213696")
    End Function
 
    Function K(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("308276084001730439550074880") And Couleur) / BigInteger.Parse("1208925819614629174706176")
    End Function
 
    Function L(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("78918677504442992524819169280") And Couleur) / BigInteger.Parse("309485009821345068724781056")
    End Function
 
    Function M(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("20203181441137406086353707335680") And Couleur) / BigInteger.Parse("79228162514264337593543950336")
    End Function
 
    Function N(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("5172014448931175958106549077934080") And Couleur) / BigInteger.Parse("20282409603651670423947251286016")
    End Function
 
    Function O(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("1324035698926381045275276563951124480") And Couleur) / BigInteger.Parse("5192296858534827628530496329220096")
    End Function
 
    Function P(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("338953138925153547590470800371487866880") And Couleur) / BigInteger.Parse("1329227995784915872903807060280344576")
    End Function
 
    Function Q(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("86772003564839308183160524895100893921280") And Couleur) / BigInteger.Parse("340282366920938463463374607431768211456")
    End Function
 
    Function R(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("22213632912598862894889094373145828843847680") And Couleur) / BigInteger.Parse("87112285931760246646623899502532662132736")
    End Function
 
    Function S(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("5686690025625308901091608159525332184025006080") And Couleur) / BigInteger.Parse("22300745198530623141535718272648361505980416")
    End Function
 
    Function T(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("1455792646560079078679451688838485039110401556480") And Couleur) / BigInteger.Parse("5708990770823839524233143877797980545530986496")
    End Function
 
    Function U(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("372682917519380244141939632342652170012262798458880") And Couleur) / BigInteger.Parse("1461501637330902918203684832716283019655932542976")
    End Function
 
    Function V(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("95406826884961342500336545879718955523139276405473280") And Couleur) / BigInteger.Parse("374144419156711147060143317175368453031918731001856")
    End Function
 
    Function W(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("24424147682550103680086155745208052613923654759801159680") And Couleur) / BigInteger.Parse("95780971304118053647396689196894323976171195136475136")
    End Function
 
    Function X(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("6252581806732826542102055870773261469164455618509096878080") And Couleur) / BigInteger.Parse("24519928653854221733733552434404946937899825954937634816")
    End Function
 
    Function Y(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("1600660942523603594778126302917954936106100638338328800788480") And Couleur) / BigInteger.Parse("6277101735386680763835789423207666416102355444464034512896")
    End Function
 
    Function Z(ByVal Couleur As BigInteger) As Byte
        Return (BigInteger.Parse("409769201286042520263200333546996463643161763414612173001850880") And Couleur) / BigInteger.Parse("1606938044258990275541962092341162602522202993782792835301376")
    End Function
 
    ' ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 
    Sub Main()
 
        Dim Couleur As BigInteger = DécodeBase255(255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255)
        Debug.WriteLine(Couleur)
 
        Debug.WriteLine(A(Couleur))
        Debug.WriteLine(B(Couleur))
        Debug.WriteLine(C(Couleur))
        Debug.WriteLine(D(Couleur))
        Debug.WriteLine(E(Couleur))
        Debug.WriteLine(F(Couleur))
        Debug.WriteLine(G(Couleur))
        Debug.WriteLine(H(Couleur))
        Debug.WriteLine(I(Couleur))
        Debug.WriteLine(J(Couleur))
        Debug.WriteLine(K(Couleur))
        Debug.WriteLine(L(Couleur))
        Debug.WriteLine(M(Couleur))
        Debug.WriteLine(N(Couleur))
        Debug.WriteLine(O(Couleur))
        Debug.WriteLine(P(Couleur))
        Debug.WriteLine(Q(Couleur))
        Debug.WriteLine(R(Couleur))
        Debug.WriteLine(S(Couleur))
        Debug.WriteLine(T(Couleur))
        Debug.WriteLine(U(Couleur))
        Debug.WriteLine(V(Couleur))
        Debug.WriteLine(W(Couleur))
        Debug.WriteLine(X(Couleur))
        Debug.WriteLine(Y(Couleur))
        Debug.WriteLine(Z(Couleur))
 
    End Sub
 
End Module