I need two PHP functions coded to compress an ASCII string of length between 0 to 256 characters to a "compressed" output string of 8 (or less) alpha-numeric characters.
Function Decompress ($string)
$str = "This is a long string that may contain any printable ASCII characters, including but not limiting to ~!#$%':232\"()_+. and escaped characters"
$cstr = compress($str)
echo $cstr // This should display an alpha-numeric string of 8 char or less.
$dstr = decompress($cstr)
echo $dstr // This should display the same content as $str