# Investigation of Energy Cost of Data Compression Algorithms in WSN for IoT Applications
## 1 Introduction and Motivation  
The 21 st century has been characterised by dramatic shifts in the ways that technology, commerce, and social patterns are organised. The fourth industrial revolution, often known as Industry 4.0, is the result of the trend toward automation and the subsequent reduction in human involvement in production across most sectors [1]. Wireless sensor networks (WSN) and the Internet of Things will play crucial roles in the Fourth Industrial Revolution (IR 4.0 or 4 IR). Since IoT devices can move, share, and exchange data without human interaction [2], it enables high flexibility and ease of implementation in a variety of applications. Wireless sensor networks have a limited lifespan due to the significant impact power consumption has on their performance [3]. Energy-efficient media access control and routing protocols [4] are only a couple of the ideas put up to address this problem. Long-term environmental monitoring is a primary goal of a large number of wireless sensor network (WSN) applications. As a result, saving battery power for sensor nodes is an important consideration. Sensor nodes have two main ways to save energy. The use of node redundancy can be a solution to this problem, as it allows a subset of sensor nodes to stay active while the others are put to sleep to save energy. All of the monitored areas must be covered by the subset of active sensor nodes, and the network must remain connected. Furthermore, these sensors must ensure that the network performs as effectively as it doeswhen all the sensors are engaged. We may extend the network's lifespan by switching between distinct subsets of sensor nodes that are active at the same time. However, such sleep-active techniques may not be implemented if node redundancy is not available (for example, due to network deployment [5; 6] or sensor breakdown [7]). Sensor nodes utilise a lot of energy when transmitting data, therefore a possible approach is to decrease the amount of data that is delivered. When sensor nodes are required to send their sensing data to sinks on a regular basis for an extended period, a solution such as this could be extremely helpful [8]. Data from sensing devices must be compressed to save traffic on the network. The data compression system is one of the methods recommended for reducing the amount of data sent through wireless networks. Reduced inter-node communication in wireless sensor networks is a result of using this strategy. Figure 1 illustrates the three kinds of data compression schemes: lossy, lossless, and recoverability of data [9]. Energy, memory, and CPU resources of sensor nodes are extremely restricted; hence, we must choose an efficient and straightforward data compression approach. In order to overcome these concerns, we adapt a lossless data compression approach for use in a wireless sensor network. The term \"lossless compression\" refers to a compression method in which, following the execution of the decompression operation, it is possible to recover data that are identical to those obtained before the execution of the compression operation [10]. Sensors in commercial nodes benefit more from lossy compression methods than lossless ones because of the higher compression ratio and lower computational cost that they provide [11]. An accurate and efficient data processing system was developed in [12] to extend the life of clustered WSNs using data prediction, compression, and recovery. The primary objective of this effort is to reduce the cost burden of communication while ensuring the precision of data processing and prediction. The authors of [13] provide a novel architecture that includes a unique combination of data prediction, compression, and recovery in their work. Huffman coding is one of the representative examples for traditional and lifetime maximization cases. When data is compressed using a method known as lossy compression, it is possible that some of the data's more specific and typically less important properties will be lost as a result of the process.