Just another update

This commit is contained in:
Ingy döt Net 2015-02-20 00:35:01 -05:00
parent a25938f123
commit 00a190b0a6
6591 changed files with 94363 additions and 23227 deletions

View file

@ -11,7 +11,8 @@ class LZW
}
for ($i = 0; $i < strlen($unc); $i++) {
$c = $unc[$i];
if (property_exists($dictionary, $w.$c)) {
$wc = $w.$c;
if (array_key_exists($w.$c, $dictionary)) {
$w = $w.$c;
} else {
array_push($result,$dictionary[$w]);
@ -22,7 +23,6 @@ class LZW
if ($w !== "") {
array_push($result,$dictionary[$w]);
}
array_shift($result);
return implode(",",$result);
}