Time-Correlated Single Photon Counting (TCSPC) sensors based on the combination of Single Photon Avalanche Diodes (SPADs), Time to Digital Converters (TDCs) and histogram-builders have become a standard for depth imaging using direct Time of Flight (D-ToF). However, one of the main current issue of this working mode is intrinsically due to the large amount of data required to generate pixelwise ToF histograms. To overcome this limitation, a 2-stage Expectation Maximization (EM) algorithm for online peak detection with its Register Transfer Level hardware implementation is proposed. The online estimator consists in sequentially computing the statistical parameters that directly encode the latent spatial distance and intensity information of the illuminated scene. The evaluation on synthetic data demonstrates that with a compression ratio of 0.4%, our approach can efficiently reduce the pixel pitch by around 40% without sacrificing timing resolution.