PERFORMANCE COMPARISON OF RUN-LENGTH, HUFFMAN AND LEMPLE-ZIV ALGORITHMS ON GRAY-SCALE PNG AND JPG IMAGES COMPRESSION

  • Okude Joshua Okude Joseph Sarwuan Tarka University Makurdi
  • Emmanuel Ogala Joseph Sarwuan Tarka University Makurdi
  • Terseer Andrew Gaav Federal University of Lafia
Keywords: Image Compression, Run-Length Encoding (RLE), Huffman Coding, Lempel-Ziv-Welch (LZW), Compression Efficiency

Abstract

Image compression plays a crucial role in optimising storage and transmission efficiency. This paper evaluates the performance of Run-Length Encoding (RLE), Huffman Coding, and Lempel-Ziv-Welch (LZW) algorithms for compressing grayscale PNG and JPG images. The study analyses their effectiveness using compression ratio, bits per pixel, and compression time as key performance metrics. Results indicate that LZW achieved the highest compression ratio, ranging from 1.0113 to 2.4020, making it the most efficient for file size reduction. RLE performed moderately, with compression ratios between 0.5456 and 2.3895, while Huffman Coding exhibited the lowest ratios, ranging from 0.2646 to 1.0680. In terms of bits per pixel, LZW recorded the lowest values, highlighting its ability to reduce data while preserving image quality. Compression time analysis revealed that RLE was the fastest, with processing times between 0.0019 and 0.0468 seconds, making it suitable for real-time applications. LZW and Huffman Coding demonstrated a trade-off between compression efficiency and speed. These findings establish LZW as the most effective algorithm for high compression with minimal quality loss, while RLE remains the best option for speed-critical applications.

References

Agber, S., Isah Odoh, S., Gideon Atabo, O., Rufina Godwin, I., Piyinkir Ndahi, B., & Akumba, B. O. (2024). Efficiency Evaluation of Huffman, Lempel-Ziv, And Run-Length Algorithms in Lossless Image Compression for Optimizing Storage and Transmission Efficiency. Article in International Journal of Computer Applications, 186(37), 9758887. https://doi.org/10.5120/ijca2024923933

Akhtarkavan, E., Majidi, B., & Mandegari, A. (2023). Secure Medical Image Communication Using Fragile Data Hiding Based on Discrete Wavelet Transform and A Lattice Vector Quantization. IEEE Access, 11, 97019715. https://doi.org/10.1109/ACCESS.2023.3238575

Alarabeyyat, A., Khdour, T., & Btoush, M. H. (2012). Lossless Image Compression Technique Using Combination Methods. January. https://doi.org/10.4236/jsea.2012.510088

Archana, R., & Jeevaraj, P. S. E. (2024). Deep learning models for digital image processing: a review. In Artificial Intelligence Review (Vol. 57, Issue 1). Springer Netherlands. https://doi.org/10.1007/s10462-023-10631-z

Azeez, N. A., & Lasisi, A. A. (2017). Empirical and Statistical Evaluation of the Effectiveness of Four Lossless Data Compression Algorithms. Nigerian Journal of Technological Development, 13(2), 64. https://doi.org/10.4314/njtd.v13i2.4

Bourai, N. E. H., Merouani, H. F., & Djebbar, A. (2024). Deep learning-assisted medical image compression challenges and opportunities: systematic review. In Neural Computing and Applications (Vol. 36, Issue 17). Springer London. https://doi.org/10.1007/s00521-024-09660-8

Das, D., Guha, S., Brubaker, J., & Semaan, B. (2024). The Colonial Impulse of Natural Language Processing: An Audit of Bengali Sentiment Analysis Tools and Their Identity-based Biases. Conference on Human Factors in Computing Systems - Proceedings, 118. https://doi.org/10.1145/3613904.3642669

Divya, M. S., Chandrashekhara, J., Vinay, S., & Ramadevi, A. (2020). Lossless Compression for Text Document Using Huffman Encoding , Run Length Encoding , and Lempel-Ziv Welch Coding Algorithms. 9(3), 100105.

Fauzan, M. N., Alif, M., & Prianto3, C. (2022). Comparison of Huffman Algorithm and Lempel Ziv Welch Algorithm in Text File Compression. IT Journal Research and Development, 7(2), 155169. https://doi.org/10.25299/itjrd.2023.10437

Fitriya, L. A., Purboyo, T. W., & Prasasti, A. L. (2017). A review of data compression techniques. International Journal of Applied Engineering Research, 12(19), 89568963.

Ibrahim, Maryam Lawal, Ahmad, M. A. (2019). AN ENHANCED RGB AN ENHANCED RGB PROJECTION ALGORITHM FOR. FUDMA Journal of Sciences (FJS), Vol. 3 No.(March), pp 280 285.

Joshi, B., Vaseer, G., Science, C., No, G., Rd, S., Range, R., Science, C., No, G., Rd, S., & Range, R. (2025). Tailoring Image Compression Algorithms for Optimal PSNR and Compression Ratio in Medical Diagnostic Imaging. 54(1), 18001811.

Kodukulla, S. T. (2020). Lossless Image compression using MATLAB. Bachelor Thesis Electrical Engineering June 2020 Bachelor, June.

Li, X., & Ji, S. (2020). Neural Image Compression and Explanation. IEEE Access, 8, 214605214615. https://doi.org/10.1109/ACCESS.2020.3041416

Lu, T., Liu, Q., He, X., Luo, H., Suchyta, E., Choi, J., Podhorszki, N., Klasky, S., Wolf, M., Liu, T., & Qiao, Z. (2018). Understanding and modeling lossy compression schemes on HPC scientific data. Proceedings - 2018 IEEE 32nd International Parallel and Distributed Processing Symposium, IPDPS 2018, 1, 348357. https://doi.org/10.1109/IPDPS.2018.00044

Ma, S. (2023). Comparison of image compression techniques using Huffman and Lempel-Ziv-Welch algorithms. Applied and Computational Engineering, 5(1), 793801. https://doi.org/10.54254/2755-2721/5/20230705

Mathpal Mittal Darji Assistant Professor Assistant Professor, D., & Mehta Assistant Professor, S. (2017). A Research Paper on Lossless Data Compression Techniques. IJIRST-International Journal for Innovative Research in Science & Technology|, 4(1), 190194. www.ijirst.org

Nitu, Kumar, Y., & Rishi, R. (2019). Fractal Image Compression Techniques. International Journal of Computer Sciences and Engineering, 7(1), 229233. https://doi.org/10.26438/ijcse/v7i1.229233

Peng, X., Zhang, Y., Peng, D., & Zhu, J. (2023). Selective Run-Length Encoding. http://arxiv.org/abs/2312.17024

Sara, U., Akter, M., & Uddin, M. S. (2019). Image Quality Assessment through FSIM, SSIM, MSE and PSNRA Comparative Study. Journal of Computer and Communications, 07(03), 818. https://doi.org/10.4236/jcc.2019.73002

Sharma, G. (2020). Analysis of Huffman Coding and Lempel-Ziv-Welch (LZW) Coding as Data Compression Techniques. International Journal of Scientific Research in Research Paper. Computer Science and Engineering, 8(1), 3744. www.isroset.org

Sujatha, T., & Selvam, K. (2022). Lossless Image Compression Using Different Encoding Algorithm for Various Medical Images. ICTACT Journal on Image and Video Processing, 12(4), 27042709. https://doi.org/10.21917/ijivp.2022.0384

Ungureanu, V. I., Negirla, P., & Korodi, A. (2024). Image-Compression Techniques: Classical and Region-of-Interest-Based Approaches Presented in Recent Papers. Sensors, 24(3). https://doi.org/10.3390/s24030791

Vemuri, B.C., Sahni, S., Kapoor, C., Leonard, C. and Fitzsimmons, J. (2014). Lossless Image Compression. The Essential Guide to Image Processing, March, 385419. https://doi.org/10.1016/B978-0-12-374457-9.00016-0

Published
2025-04-30
How to Cite
Okude, O. J., Ogala, E., & Gaav, T. A. (2025). PERFORMANCE COMPARISON OF RUN-LENGTH, HUFFMAN AND LEMPLE-ZIV ALGORITHMS ON GRAY-SCALE PNG AND JPG IMAGES COMPRESSION. FUDMA JOURNAL OF SCIENCES, 9(4), 99 - 105. https://doi.org/10.33003/fjs-2025-0904-3555