Hjg.Pngcs.PngWriter.ComputeCompressionRatio C# (CSharp) Method

ComputeCompressionRatio() public method

Computes compressed size/raw size, approximate
Actually: compressed size = total size of IDAT data , raw size = uncompressed pixel bytes = rows * (bytesPerRow + 1)
public ComputeCompressionRatio ( ) : double
return double
        public double ComputeCompressionRatio()
        {
            if (CurrentChunkGroup < ChunksList.CHUNK_GROUP_6_END)
                throw new PngjException("must be called after End()");
            double compressed = (double)datStream.GetCountFlushed();
            double raw = (ImgInfo.BytesPerRow + 1) * ImgInfo.Rows;
            return compressed / raw;
        }