diff --git a/!TheEsc/Makefile,fe1 b/!TheEsc/Makefile,fe1 index e881ed6..f826cb4 100644 --- a/!TheEsc/Makefile,fe1 +++ b/!TheEsc/Makefile,fe1 @@ -54,6 +54,12 @@ o.CTheEscape: C:h.kernel o.CTheEscape: C:h.kernel o.CTheEscape: h.Sound o.CTheEscape: h.Graphics +o.CTheEscape: c.CTheEscape +o.CTheEscape: C:h.swis +o.CTheEscape: C:h.kernel +o.CTheEscape: C:h.kernel +o.CTheEscape: h.Sound +o.CTheEscape: h.Graphics o.Sound: c.Sound o.Sound: C:h.swis o.Sound: C:h.kernel diff --git a/!TheEsc/compress.php b/!TheEsc/compress.php new file mode 100644 index 0000000..3bebb25 --- /dev/null +++ b/!TheEsc/compress.php @@ -0,0 +1,70 @@ + 3) + $newstring .= ">" . chr($consec) . $array[$i]; + else + $newstring .= str_repeat($array[$i],$consec); + $consec = 1; + }else{ + $consec++; + } + } + return $newstring; +} + +function map_decompress($data) +{ + $newstring = ""; + $array = str_split($data); + $inrep = 0; + $repcount = ""; + for($i = 0; $i < strlen($data);$i++) + { + if(($array[$i] == ">") && ($inrep == 0)) + $inrep = 1; + elseif($inrep == 1) + { + $inrep = 0; + $repcount .= $array[$i]; + } + else + { + if($repcount != "") + { + $newstring .= str_repeat($array[$i],intval(ord($repcount))); + $repcount = ""; + } + else + { + $newstring .= $array[$i]; + } + } + } + return base64_decode($newstring); +} + +$mapdata = file_get_contents("S:\\RiscOSDev\\rpcemu-win32-0.9.3-bundle-371-issue-1\\RPCEmu - 371\\hostfs\\Dev\\!TheEsc\\m2_map,ffd); + +echo "In Raw " . md5($mapdata). " " . strlen($mapdata). "\n"; + +$compressedstring = map_compress($mapdata); +echo "Cmprssd " . md5($compressedstring). " " . strlen($compressedstring). "\n"; + +$decompressedstring = map_decompress($compressedstring); +echo "Out Raw " .md5($decompressedstring). " " . strlen($decompressedstring). "\n"; + +?> \ No newline at end of file