We present a sophisticated framework to systematically explore the temporal correlation in environmental monitoring wireless sensor networks. The presented framework optimizes lossless data compression in communications given the resource constraint of sensor nodes. The insights and analyses obtained from the framework can directly lead to innovative and better design of data gathering protocols for wireless sensor networks operated in noisy environments to dramatically reduce the energy consumptions. Categories and Subject Descriptors E.4 [Coding and Information Theory]: Data compaction and compression; C.2.1 [Network Architecture and Design]: Wireless communication General Terms Algorithms Keywords Wireless sensor networks, energy efficiency, lossless compression