# An Efficient Encoding Algorithm Using Local Path on Huffman Encoding Algorithm for Compression
## 5 Discussion of Results  
CP and NoBPP were terms both used in the scope of the study. First, CP values of each group were analyzed. Then, NoBPP values were evaluated. The CP values of the first group of images from Huffman encoding algorithm, arithmetic coding, and proposed algorithm are summarized in Figure 14.  
Figure 14: Compression percentage (CP) values of Group 1 images. Figure 13: Group 3 images. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline  & & & \multicolumn{2}{c}{**Huffman**} & \multicolumn{2}{c}{**Arithmetic**} & \multicolumn{2}{c}{**Proposed**} \\ \multirow{2}{*}{**Image**} & \multirow{2}{*}{**Type**} & \multirow{2}{*}{**Size**} & \multicolumn{2}{c}{**Encoding**} & \multicolumn{2}{c}{**Coding**} & \multicolumn{2}{c}{**Algorithm**} \\ \cline{5-10}  & & & **NoBPP** & **CP** & **NoBPP** & **CP** & **NoBPP** & **CP** \\ \hline Image 1 & Color & 1360 \(\times\) 1024 & 7.10 & 11.19 & 7.08 & 11.50 & 7.03 & 12.08 \\ Image 2 & Color & 1360 \(\times\) 1024 & 6.99 & 12.61 & 6.96 &  
The CP values of the second group, with randomly selected images from the internet, are depicted in Figure 15. It was observed that the proposed algorithm was better in the second group of images compared to the first group of images. Medical image compression is a frequently studied area in the literature. Therefore, the proposed algorithm was also tested on medical images. The CP values of the third group of images is shown in Figure 16.  
The second term used in the evaluation phase of the proposed encoding algorithm was NoBPP. The main purpose of compression algorithms is to reduce the bits per pixel. Therefore, the NoBPP value is used for more consistent and accurate results. The NoBPP value is presented for each group of images. NoBPP values obtained from the algorithms applied to the first group of images are shown in Figure 17. The NoBPP values of the images in the second group are presented in Figure 18.  
Figure 16: CP values of Group 3 images. Figure 15: CP values of Group 2 images. NoBPP values from the third group of images containing medical images are depicted in Figure 19. As seen from the data, in the first group of images the proposed encoding algorithm showed better CP and NoBPP values than the Huffman encoding algorithm. However, it lagged slightly behind the arithmetic coding algorithm. The developed encoding algorithm provided better CP and NoBPP values in the second group of images compared to both the Huffman encoding and arithmetic coding algorithms. In the last group, where medical images were used, the developed coding algorithm showed better CP and NoBPP values. Considering these values, the developed encoding algorithm performed better than the algorithms in the core of many image compression algorithms. The resultant compression performance was better than arithmetic coding, which proves the success of the developed encoding algorithm. It offered fast runtimes and was easy to implement due to the use of only the Huffman encoding algorithm tree structure. Figure 14:0 NoBPP values of Group 1 images. Figure 14:1 NoBPP values of Group 2 images. When analyzing the success of the image groups, it was seen that the developed encoding algorithm provided better results in the images under the following conditions:  
1. When the Huffman tree had an unbalanced tree structure. Otherwise, results were similar to (or better than) the Huffman Encoding Algorithm. 2. In images where the same pixels were as consecutive as possible over the image, e.g., the map images in the second group, all medical images in the third group, and the images of the candies and the man in the first group. 3. When there was a lower number of characters in the image. Although the number of different characters in medical images is high, our algorithm gave more successful results. This is because consecutive pixels are represented by the same local path, which is the advantage of our algorithm.