Lossless and near lossless compression of images with sparse histograms. (8th March 2021)