using gzdeflate on a string php
yes you can actually run compression on a string to save space and then uncompress it at the other end...
PHP
$string = str_repeat('1234567890' . implode('', range('a', 'z')), 48800);
echo strlen($string); //1756800 bytes
$compressed = gzdeflate($string, 9);
$compressed = gzdeflate($compressed, 9);
echo strlen($compressed); //99 bytes
echo gzinflate(gzinflate($compressed));
External Link for using gzdeflate on a string php