Jump to content

alternative to base64_encode?


etrader
 Share

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • 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.