\'\'\' http://tizzyt-archive.blogspot.com/2014/02/saving-bandwidth-while-chatting-using.html
Public Class TZ_Encoding
Private Shared LtrNbr As String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789"
Private Shared HexTable6 As Byte(,) =
{{0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 1, 1}, {0, 0, 0, 1, 0, 0}, {0, 0, 0, 1, 0, 1},
{0, 0, 0, 1, 1, 0}, {0, 0, 0, 1, 1, 1}, {0, 0, 1, 0, 0, 0},
{0, 0, 1, 0, 0, 1}, {0, 0, 1, 0, 1, 0}, {0, 0, 1, 0, 1, 1},
{0, 0, 1, 1, 0, 0}, {0, 0, 1, 1, 0, 1}, {0, 0, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1}, {0, 1, 0, 0, 0, 0}, {0, 1, 0, 0, 0, 1},
{0, 1, 0, 0, 1, 0}, {0, 1, 0, 0, 1, 1}, {0, 1, 0, 1, 0, 0},
{0, 1, 0, 1, 0, 1}, {0, 1, 0, 1, 1, 0}, {0, 1, 0, 1, 1, 1},
{0, 1, 1, 0, 0, 0}, {0, 1, 1, 0, 0, 1}, {0, 1, 1, 0, 1, 0},
{0, 1, 1, 0, 1, 1}, {0, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 0, 1},
{0, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1}, {1, 0, 0, 0, 0, 0},
{1, 0, 0, 0, 0, 1}, {1, 0, 0, 0, 1, 0}, {1, 0, 0, 0, 1, 1},
{1, 0, 0, 1, 0, 0}, {1, 0, 0, 1, 0, 1}, {1, 0, 0, 1, 1, 0},
{1, 0, 0, 1, 1, 1}, {1, 0, 1, 0, 0, 0}, {1, 0, 1, 0, 0, 1},
{1, 0, 1, 0, 1, 0}, {1, 0, 1, 0, 1, 1}, {1, 0, 1, 1, 0, 0},
{1, 0, 1, 1, 0, 1}, {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{1, 1, 1, 0, 1, 0, 0, 0}, {1, 1, 1, 0, 1, 0, 0, 1}, {1, 1, 1, 0, 1, 0, 1, 0}, {1, 1, 1, 0, 1, 0, 1, 1},
{1, 1, 1, 0, 1, 1, 0, 0}, {1, 1, 1, 0, 1, 1, 0, 1}, {1, 1, 1, 0, 1, 1, 1, 0}, {1, 1, 1, 0, 1, 1, 1, 1},
{1, 1, 1, 1, 0, 0, 0, 0}, {1, 1, 1, 1, 0, 0, 0, 1}, {1, 1, 1, 1, 0, 0, 1, 0}, {1, 1, 1, 1, 0, 0, 1, 1},
{1, 1, 1, 1, 0, 1, 0, 0}, {1, 1, 1, 1, 0, 1, 0, 1}, {1, 1, 1, 1, 0, 1, 1, 0}, {1, 1, 1, 1, 0, 1, 1, 1},
{1, 1, 1, 1, 1, 0, 0, 0}, {1, 1, 1, 1, 1, 0, 0, 1}, {1, 1, 1, 1, 1, 0, 1, 0}, {1, 1, 1, 1, 1, 0, 1, 1},
{1, 1, 1, 1, 1, 1, 0, 0}, {1, 1, 1, 1, 1, 1, 0, 1}, {1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1}}
Public Shared Function Encode(ByVal Message As String) As Byte()
If Message = String.Empty Then Return {}
Dim FinalMessage As New List(Of Byte)
Dim OptMessage As New List(Of Byte)
Dim Bit As Integer
OptMessage.Add(1) : OptMessage.Add(0)
For i = 0 To Message.Length - 1
Bit = LtrNbr.IndexOf(Message(i))
If Bit = -1 Then
FinalMessage.AddRange(System.Text.Encoding.UTF8.GetBytes(Message(i)))
OptMessage.Add(1)
OptMessage.Add(1)
OptMessage.Add(1)
OptMessage.Add(1)
OptMessage.Add(1)
OptMessage.Add(1)
Else
OptMessage.Add(HexTable6(Bit, 0))
OptMessage.Add(HexTable6(Bit, 1))
OptMessage.Add(HexTable6(Bit, 2))
OptMessage.Add(HexTable6(Bit, 3))
OptMessage.Add(HexTable6(Bit, 4))
OptMessage.Add(HexTable6(Bit, 5))
End If
Next
Bit = OptMessage.Count Mod 8
If Not Bit = 0 Then For i = 1 To 8 - Bit : OptMessage.Add(1) : Next
For i = 0 To OptMessage.Count - 1 Step 8
Bit = 0
If OptMessage(i) = 1 Then Bit += 128
If OptMessage(i + 1) = 1 Then Bit += 64
If OptMessage(i + 2) = 1 Then Bit += 32
If OptMessage(i + 3) = 1 Then Bit += 16
If OptMessage(i + 4) = 1 Then Bit += 8
If OptMessage(i + 5) = 1 Then Bit += 4
If OptMessage(i + 6) = 1 Then Bit += 2
If OptMessage(i + 7) = 1 Then Bit += 1
FinalMessage.Add(Bit)
Next
Return FinalMessage.ToArray
End Function
Public Shared Function Decode(ByVal Message() As Byte) As String
If Message.Length = 0 Then Return String.Empty
Dim FinalMessage As New System.Text.StringBuilder
Dim NbrOfSpcChar As Integer = 0
Dim Bit As Integer = 0
Dim Phase As Integer = 1
Dim Rmdr As Integer = 0
For i = 0 To Message.Length - 1
Select Case Message(i)
Case Is >= 252 : i += 5
Case Is >= 248 : i += 4
Case Is >= 240 : i += 3
Case Is >= 224 : i += 2
Case Is >= 192 : i += 1
Case Is >= 128
FinalMessage.Append(System.Text.Encoding.UTF8.GetString(Message.Take(i).ToArray))
Message = Message.Skip(i).ToArray
Exit For
End Select
NbrOfSpcChar += 1
If i = Message.Length - 1 Then Return System.Text.Encoding.UTF8.GetString(Message)
Next
If HexTable8(Message(0), 2) = 1 Then Bit += 32
If HexTable8(Message(0), 3) = 1 Then Bit += 16
If HexTable8(Message(0), 4) = 1 Then Bit += 8
If HexTable8(Message(0), 5) = 1 Then Bit += 4
If HexTable8(Message(0), 6) = 1 Then Bit += 2
If HexTable8(Message(0), 7) = 1 Then Bit += 1
If Not Bit = 63 Then
FinalMessage.Append(LtrNbr(Bit))
Else
If Not NbrOfSpcChar = 0 Then
FinalMessage.Append(FinalMessage(0))
FinalMessage.Remove(0, 1)
NbrOfSpcChar -= 1
Else
Return FinalMessage.ToString
End If
End If
Bit = 0
For i = 1 To Message.Length - 1
Select Case Phase
Case 0
If HexTable8(Message(i), 0) = 1 Then Bit += 2
If HexTable8(Message(i), 1) = 1 Then Bit += 1
Bit += Rmdr
Rmdr = 0
If Not Bit = 63 Then
FinalMessage.Append(LtrNbr(Bit))
Else
If Not NbrOfSpcChar = 0 Then
FinalMessage.Append(FinalMessage(0))
FinalMessage.Remove(0, 1)
NbrOfSpcChar -= 1
Else
Exit For
End If
End If
Bit = 0
If HexTable8(Message(i), 2) = 1 Then Bit += 32
If HexTable8(Message(i), 3) = 1 Then Bit += 16
If HexTable8(Message(i), 4) = 1 Then Bit += 8
If HexTable8(Message(i), 5) = 1 Then Bit += 4
If HexTable8(Message(i), 6) = 1 Then Bit += 2
If HexTable8(Message(i), 7) = 1 Then Bit += 1
If Not Bit = 63 Then
FinalMessage.Append(LtrNbr(Bit))
Else
If Not NbrOfSpcChar = 0 Then
FinalMessage.Append(FinalMessage(0))
FinalMessage.Remove(0, 1)
NbrOfSpcChar -= 1
Else
Exit For
End If
End If
Bit = 0
Phase += 1
Case 1
If HexTable8(Message(i), 0) = 1 Then Bit += 32
If HexTable8(Message(i), 1) = 1 Then Bit += 16
If HexTable8(Message(i), 2) = 1 Then Bit += 8
If HexTable8(Message(i), 3) = 1 Then Bit += 4
If HexTable8(Message(i), 4) = 1 Then Bit += 2
If HexTable8(Message(i), 5) = 1 Then Bit += 1
If Not Bit = 63 Then
FinalMessage.Append(LtrNbr(Bit))
Else
If Not NbrOfSpcChar = 0 Then
FinalMessage.Append(FinalMessage(0))
FinalMessage.Remove(0, 1)
NbrOfSpcChar -= 1
Else
Exit For
End If
End If
Bit = 0
If HexTable8(Message(i), 6) = 1 Then Rmdr += 32
If HexTable8(Message(i), 7) = 1 Then Rmdr += 16
Phase += 1
Case 2
If HexTable8(Message(i), 0) = 1 Then Bit += 8
If HexTable8(Message(i), 1) = 1 Then Bit += 4
If HexTable8(Message(i), 2) = 1 Then Bit += 2
If HexTable8(Message(i), 3) = 1 Then Bit += 1
Bit += Rmdr
Rmdr = 0
If Not Bit = 63 Then
FinalMessage.Append(LtrNbr(Bit))
Else
If Not NbrOfSpcChar = 0 Then
FinalMessage.Append(FinalMessage(0))
FinalMessage.Remove(0, 1)
NbrOfSpcChar -= 1
Else
Exit For
End If
End If
Bit = 0
If HexTable8(Message(i), 4) = 1 Then Rmdr += 32
If HexTable8(Message(i), 5) = 1 Then Rmdr += 16
If HexTable8(Message(i), 6) = 1 Then Rmdr += 8
If HexTable8(Message(i), 7) = 1 Then Rmdr += 4
Phase = 0
End Select
Next
Return FinalMessage.ToString
End Function
End Class