Abstract-In this paper we propose a new lossless compression algorithm suitable for Internet of Things (IoT). The proposed algorithm, named RAKE, is based only on elementary counting operations and has low memory requirements, and therefore it can be easily implemented in low-cost and low-speed microcontrollers as those used in IoT devices. Despite its simplicity, simulation results show that, in the case of sparse sequences, the proposed algorithm outperforms well-known lossless compression algorithms such as rar, gzip and bzip2. Moreover, in the case of real-world data, RAKE achieves higher compression ratios as even compared to IoT-specific lossless compression algorithms.