Computers (Mar 2021)

A Lossless Compression Method for Chat Messages Based on Huffman Coding and Dynamic Programming

  • Julián Moreno Cadavid,
  • Hernán Darío Vanegas Madrigal

DOI
https://doi.org/10.3390/computers10030028
Journal volume & issue
Vol. 10, no. 3
p. 28

Abstract

Read online

There is always an increasing demand for data storage and transfer; therefore, data compression will always be a fundamental need. In this article, we propose a lossless data compression method focused on a particular kind of data, namely, chat messages, which are typically non-formal, short-length strings. This method can be considered a hybrid because it combines two different algorithmic approaches: greedy algorithms, specifically Huffman coding, on the one hand and dynamic programming on the other (HCDP = Huffman Coding + Dynamic Programming). The experimental results demonstrated that our method provided lower compression ratios when compared with six reference algorithms, with reductions between 23.7% and 39.7%, whilst the average remained below the average value reported in several related works found in the literature. Such performance carries a sacrifice in speed, however, which does not presume major practical implications in the context of short-length strings.

Keywords