<?php
$str = 'Hello I am a very very very very long string';
$compressed = gzcompress($str, 9);
$uncompressed = gzuncompress($compressed);
echo $str, "\n";
echo $uncompressed, "\n";
echo base64_encode($compressed), "\n";
echo bin2hex($compressed), "\n";
echo urlencode($compressed), "\n";
Hello I am a very very very very long string
Hello I am a very very very very long string
eNrzSM3JyVfwVEjMVUhUKEstqkQncvLz0hWKS4oy89IBV2AP7A==
78daf348cdc9c957f05448cc554854284b2daa442772f2f3d2158a4b8a32f3d20157600fec
x%DA%F3H%CD%C9%C9W%F0TH%CCUHT%28K-%AAD%27r%F2%F3%D2%15%8AK%8A2%F3%D2%01W%60%0F%EC