A CMOS mini-SiPM detector with in-pixel data compression for PET applications