Reputation: 8565
Is there a way for me to lossless compress text with the following characters(88 in total)?
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789!@#$%&*()-_+=;:'"<,>.?/[]{}
I am making a chat but I don't want it to be wasting so much bandwidth(an old chat I used a few hours wasted 800mb).
The text would be compressed in javascript(when typed in to chat input box), sent to php(which saves them somewhere), then sent back when requested(ajax in chat) in the compressed format and decompressed with javascript.
Upvotes: 3
Views: 926
Reputation: 316969
You don't need compression when sending to the chat server. That's not your bandwidth.
To save traffic when sending from the chat server, just enable GZip compression.
Upvotes: 7