Decoding table for TomTom traffic messages

Huffman table
At some point I wanted to write a proxy server for TomTom's traffic service, which would understand the traffic information TomTom's servers would send to my device and store the data. The current and historic data would then be used to make a prediction of the traffic situation in the near term future (say an hour from now), which the proxy server would then feed to my TomTom navigator instead of the current traffic sitution. (The idea being that while I'm currently not in bad traffic, it's more relevant to know where the traffic will be bad an hour from now when I actually get at a place where there is bad traffic, than it is to know there is no bad traffic at this point in time).

The first step was to decode the data stream and protocol. TomTom uses a normal HTTP GET request to get the latest traffic data, and the device either gets a full update, or an incremental update of the traffic data. The data that it receives is compressed via so called Static Huffman encoding, a datacompression method where each symbol is transmitted using a prearranged bit sequence, where different symbols have a different length sequence: frequent occuring symbols have a short sequence while really rare symbols have a longer sequence of bits.

After a day or two of looking at the packets in early January 2006, I figured out most of the Huffman encodings that are used. In addition I managed to decode the traffic format that was used, and half of the proxy server got written (the part where the current traffic is stored in a database). At that time I started my new job, and also bought a phone with built in bluetooth capability and the project lost relevance for me.

In case someone wants to pick up this project, I've posted the Huffman table below.

a	010110
b	0100001
c	00101111
d	0100010
e	10111
f	001001001
g	00110000
h	00110001
i	010111
j	0001001010
k	001001010
l	0100011
m	00110010
n	011000
o	0100100
p	00110011
q
r	011001
s	0100101
t	011010
u	00110100
v	00110101
w	001001011
x	011011
y	001001100
z	0001001011
<space>	1101
<enter>	01110
.	000111111
-	010100
+	0011101 (gok)
'	00000011110
/	001011000
(	00101010
)	00101011
A	00101101
B	0001000010
C	001000001
D	001000010
E	0001000011
F	0000100100
G	0001000100
H	001000011
I	00000100101
J	00000100110
K	0001000101
L	001000100
M	001000101
N	0100000
O	10110
P	001000110
Q
R	001000111
S	00101110
T	0001000110
U	0001000111
V	001001000
W	0001001000
X
Y	00000101001
Z	0001001001


0	1110
1	1111
2	01111
3	10000
4	10001
5	10010
6	10011
7	10100
8	10101
9	010101



e`	  	0001111001
e'		0001111010
e"		0001111100
o"		00001110010
u"		00001111000