You are here

function csstidy_print::get_ratio in Advanced CSS/JS Aggregation 6

Same name and namespace in other branches
  1. 7 advagg_css_compress/csstidy/class.csstidy_print.inc \csstidy_print::get_ratio()

Get compression ratio @access public

@version 1.2

Return value

float

File

advagg_css_compress/csstidy/class.csstidy_print.inc, line 366

Class

csstidy_print
CSS Printing class

Code

function get_ratio() {
  if (!$this->output_css_plain) {
    $this
      ->formatted();
  }
  return round((strlen($this->input_css) - strlen($this->output_css_plain)) / strlen($this->input_css), 3) * 100;
}