开发者

Simple Text Lossless Compression PHP/JavaScript

开发者 https://www.devze.com 2023-01-04 16:42 出处:网络
Is there a way for me to lossless compress text with the following characters(88 in total)? abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789!@#$%&*()-_+=;:\'\"<,>.?/[]{}

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 w开发者_JAVA技巧ould 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消