Overloaded compress() of RLImgUtil.