protected function estimateSavings()
	{
		$this->savings = [];
		foreach ($this->getStringsFrequency() as $str => $cnt)
		{
			$len             = strlen($str);
			$originalCost    = $cnt * $len;
			$replacementCost = $cnt * 2;
			$overhead        = $len + 6;

			$this->savings[$str] = $originalCost - ($replacementCost + $overhead);
		}
	}
protected function estimateSavings()
	{
		$this->savings = [];
		foreach ($this->getStringsFrequency() as $str => $cnt)
		{
			$len             = strlen($str);
			$originalCost    = $cnt * $len;
			$replacementCost = $cnt * 2;
			$overhead        = $len + 6;

			$this->savings[$str] = $originalCost - ($replacementCost + $overhead);
		}
	}
protected function estimateSavings ( ) { $ this -> savings = [ ] ; foreach ( $ this -> getStringsFrequency ( ) as $ str => $ cnt ) { $ len = strlen ( $ str ) ; $ originalCost = $ cnt * $ len ; $ replacementCost = $ cnt * 2 ; $ overhead = $ len + 6 ; $ this -> savings [ $ str ] = $ originalCost - ( $ replacementCost + $ overhead ) ; } }
Estimate the savings of every possible string replacement

@return void
Estimate the savings of every possible string replacement