This project report presents a new data compression algorithm called K-RLE for use in wireless sensor networks. K-RLE is based on run-length encoding (RLE) but introduces a parameter K that allows runs of similar data values to be compressed together. This increases compression ratio compared to standard RLE. The project implements K-RLE compression in an FPGA with ADC, FIFOs and a compression controller block. Simulation results show K-RLE can achieve higher compression than RLE with lower hardware requirements and power consumption, making it suitable for wireless sensor networks where energy efficiency is important.