# Compression of GNSS Data with the Aim of Speeding up Communication to Autonomous Vehicles
## 7 Results
The high compression rates we get here, which are better than with Zip, come at the expense of not being able to recover if the file or parts of it are damaged during transmitting or building (survivability). We also tried some larger files, and the results were a little bit better. The results of the larger files can be found in Table 2 (GNSS data file and compression results). Figure 5 compares the average percentages of size that have been saved by each of the methods. It can be concluded that Diff&Mapping&Zip gives the best compression, but there is no error resilience in this method, whereas Diff&Huffman, even with somewhat lower results, has the feature of automatic error resilience. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Name and Pure** & & & & **Compression Method and Ratio.** & \\
**Size of File:** & & & & **Ratio=100–\(\frac{result}{Total}\times\)100** & \\ \hline \multirow{3}{*}{Test 2 = 556 KB} & Zip & Diff & **Diff\&Huff** & Diff\&Mapping\&Zip \\ \cline{2-6}  & 53 KB & 401 KB & **70 KB** & 45 KB & 34 KB \\ \cline{2-6}  & 90.47\% & 22.30\% & **87.4\%** & 93.91\% & 93.88\% \\ \hline \multirow{3}{*}{Test 3 = 929 KB} & 87 KB & 671 KB & **118 KB** & 75 KB & 57 KB \\ \cline{2-6}  & 90.64\% & 27.8\% & **87.3\%** & 91.93\% & 93.86\% \\ \hline \multirow{3}{*}{Test 4 = 9158 KB} & 861 KB & 6231 KB & **1061 KB** & 730 KB & 563 KB \\ \cline{2-6}  & 91.5\% & 31.96\% & **88.41\%** & 92.03\% & 93.85\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison between different compression methods–source files are 556 KB–9158 KB. Figure 5: Average ratio between compression methods (percentages). Another option that has been tested is performing ZIP compression and then running compression using our algorithm. This option was ruled out because after doing ZIP, a file that is mostly random will be created, and random files cannot be compressed [58]. Huffman coding is a very popular method used by many applications such as MP3 and JPEG. At the same time, another method can be used--that of [PERSON] [59], but its compression is inferior to Huffman coding [60]. Therefore, we preferred Huffman codes. In the table in Appendix B, we see how many bits we save per symbol by using Huffman codes. However, we save even more because the compression method presented here has several stages, so in the preliminary stage we have already converted a sequence of repeating characters (prefixes) into one symbol and have already made some reduction in the data size. To evaluate the efficiency of the proposed method, we calculate Shannon Entropy. Shannon Entropy Formula is \(\mathrm{S(x)}=-\sum_{i=0}^{n}\mathrm{p(x_{i})log_{2}(p(x_{i}))}\) where \(\mathrm{p(x_{i})}\) is the probability of getting the value \(\mathrm{x_{i}}\). More explanation of the Shannon Entropy formula can be found in [61]. It can be seen in the detailed spreadsheet in Appendix B that [PERSON]'s entropy gives a result of 5.548, which is indeed optimal. This entropy is very close to the result obtained in this work by using Huffman coding 5.581. The results are shown in Figure 6.  
The slight increment occurs because the Huffman algorithm rounds off the number of bits for each codeword and therefore a very close entropy is obtained by the Huffman algorithm, even if not optimal.