Abstract:Wireless sensor networks usually have limited energy and transmission capacity. A critical and practical demand is to online compress sensor data streams continuously. This paper makes the following contributions. First, using the built-in buffer of sensor node, a piecewise constant approximation based data compression algorithm with infinite norm error bound is presented, which is named PCADC-sensor and is a near online algorithm. Second, with infinite norm and square norm error bound respectively, this study proposes two online piecewise linear approximation based data compression algorithms in sensor node, named PLADC-sensor. A necessary and sufficient condition of PLA uniform approximation is given. Third, a piecewise linear representations based data compression algorithm in cluster head or sink, named PLRDC-cluster is presented. It does not need raw sensory data and can be applied to calculate aggregate functions. Last, the experiments on real-world sensor dataset show that the proposed algorithms match the sensor data stream model and can achieve significant data reduction.