Compress/Decompress Functions in PHP
$30-250 USD
Paid on delivery
I need two PHP functions coded to compress an ASCII string of any length (approx 7-8 thousand characters) to a "compressed" output. The compressed string (alphanumeric) should not have more than 80 characters into it.
Example:
Function Compress($string)
Function Decompress ($string)
Usage example:
$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 upto 80 char or less.
$dstr = decompress($cstr)
echo $dstr // This should display the same content as $str
I don't want to rely on any libraries (e.g. bzcompress) or gzip for these functions to work.
Just simple byte/bit shifting or hashing algorithm should do the job I think.
To give you better understanding, I have a advance search page into my application which generates the dynamic SQL query based on the user's selection criteria from the advance search page. Sometimes query might get very complex and the entire length of the query becomes somewhere upto 8000 characters. So I want to compress the entire query (into alphanumeric characters).
Pls note. Only serious bidders will be entertained.
Project ID: #370327
About the project
4 freelancers are bidding on average $58 for this job
It's impossible to compress 8000 bytes to 80 (100 times!) and then decompress it. But I sure, we can find ways to solve your problem. Please, give more details
will be done with the best possible solution. Let me know mpre about thr project, ready to start work immediately.