## 2 Background Information  
### Relative WSN Compression Approaches  
Based on the previous analysis, an elicitation concerning adequate compression algorithms for epilepsy monitoring and utilization in WSN networks is conducted. The elicitation process followed a multifaceted approach considering (a) the nature of the application scenario the authors focused on, which is electrocardiogram/electroencephalogram (ECG/EEG) physiological signal monitoring, (b) the representation of the digitized data as time-series and (c) the performance aspects taking into consideration the utilization in on-the-fly WSN scenarios. With respect to the first characteristic, the criticality and the accuracy required for the monitoring and study of epileptic people dictates zero tolerance to datum corruption due to the compression process. Consequently, only lossless compression algorithms suitable for wireless sensors have been considered [7; 8] as opposed to lossy approaches. Regarding the second parameter, we focused on algorithms well known for their effectiveness on time-series datasets [7; 8; 9; 10; 11] taking into consideration that both Electroencephalography (EEG) and Electrocardiography (ECG) result into time-series datasets. Finally, emphasizing on the utilization of such algorithms in the context of WSNs, our elicitation process focuses on low complexity in order to offer viable solutions for typical WSN nodes. In addition, it aims at minimizing the delay overhead and operating in a time constrained manner [10]. Taking into account a wide range of adequate compression approaches, the algorithms Lossless Entropy Compression (LEC) [8] and Adaptive Lossless Entropy Compression (ALEC) [10] were finally selected as the starting point for the hardware implementation. LEC is a low complexity lossless entropy compression algorithm resulting in a very small code footprint that requires very low computational power [12]. Its operation is based on utilizing a very small dictionary and exhibits impressive on-the-fly compression capabilities. Consequently, LEC is quite attractive for WSN deployments. The main steps of the algorithm include:  
* Calculation of differential signal. * Computing of the difference \(d_{i}\) between the binary representations \(r_{i}\) and \(r_{i}-1\) of the current and previous measurements respectively, encoding is applied upon \(d_{i}\) resulting in the corresponding bit sequence \(bs_{i}\). * The sequence \(bs_{i}\) is then concatenated to the bit sequence stream generated so far. The main processing complexity is attributed to the encoding phase of the compression, which aims at transforming \(d_{i}\) to \(bs_{i}\) bit sequences. During this process, firstly the number \(n_{i}\) of bits needed to encode the value of \(d_{i}\) is computed. Secondly, the first part of \(bs_{i}\), indicated as \(s_{i}\), is generated by using the table that contains the dictionary adopted by the entropy compressor. In that respect, in our initial evaluation JPEG algorithm has been adopted because the coefficients used in the JPEG have similar statistical characteristics to the measurements acquired by the sensing unit. In our implementation, the table has been extended so as to cover the necessary 16-bit resolution of the Analog to Digital Convertor (ADC) in the sensors. Thirdly, the second part of \(bs_{i}\), indicated as \(a_{i}\) is the \(n_{i}\) low-order bits of \(d_{i}\) is calculated [8]. Focusing on the implementation features of LEC, it can be implemented by maintaining in memory only the column \(s_{i}\) of the aforementioned table. Overall, it can be easily extracted that LEC avoids any computationally intensive operation, which is highly appreciated in scarce resource WSN platforms. As a result, it exhibits very low execution delay facilitating real-time operation. However, basing its operation solely on a static lookup table, it does not support dynamic configuration capabilities with respect to the characteristics of a specific signal.