add compressratio function