Whole Slide Imaging (WSI) has revolutionized digital pathology but presents significant challenges in storing the high resolution images, given the massive file sizes. While standard image compression can reduce WSI file sizes, it applies blind compression on the whole WSI. This might lose potential bandwidth on non-diagnostic regions while compromising diagnostically relevant regions. To address this challenge, we propose a hybrid WSI compression technique that applies lossless compression to annotated clinically relevant Regions of Interest (ROIs) and lossy compression to the background. We implemented and evaluated a framework supporting multiple codecs, including lossless (JPEG-LS, PNG, ZSTD) and lossy (JPEG, JPEG-XL, JPEG2000) variants. Our results, evaluated on a representative set of WSI images, demonstrate compressed file sizes up to $30\times$ smaller than the uncompressed originals, while preserving diagnostic quality in the annotated ROIs. The method efficiently stores ROI metadata for seamless reconstruction. This work provides a practical and efficient path for integrating task-aware compression into digital pathology workflows.
PDF