Jump to content

alternative to base64_encode?


etrader

Recommended Posts

Assuming there is repetitive data and data patterns, you could compress/uncompress the data using zip or gz compression. If the data is not repetitive or is fairly short, the result will still be longer than the original and you will have also wasted the processing time needed to compress/uncompress the data.

 

What exactly are you trying to accomplish?

That best way of accomplishing that would be to not pass the information through the URL in the first place. Can you pass this same information between pages using $_SESSION variable(s)?

 

There is no magic in programming. zip/gz compression looks for sequences and patterns in the data and makes a table. It then replaces those patterns in the data with a token/value that represents the corresponding entry in the table. The table and the 'tokenized' data must then be transfered, in binary, which would itself require something like base64 encoding to get it all into a URL. You reverse the process when you uncompress the data.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.