aleixrodriala / wa-tunnel

Tunneling Internet traffic over Whatsapp
MIT License
2.08k stars 96 forks source link

Use compression for more data per message #7

Closed TheAlan404 closed 1 year ago

TheAlan404 commented 1 year ago

We can make compression optional using some sort of configuration like config.json

good ol' require("zlib") can do

aleixrodriala commented 1 year ago

Sure, we can set it as optional if we find any efficient one.

I tested though using brotli for example and got same character length or sometimes a bit more since you still have to encode it to base64 or to String after compressing.

But I still have to do more testing with gzip or other compression methods to be able to have a better compression rate than only base64.

If anyone knows a more efficient method please let me know.

TheAlan404 commented 1 year ago

wait a second, cant we send files? if so, whats the limit?

aleixrodriala commented 1 year ago

Yes, the issue with files is the latency, that's why I added it in the todo list only for sending big chunks.

Another thing that we would need to do is cache socket answers since most of the times give partial answers and by doing so we also could reduce some latency.

aleixrodriala commented 1 year ago

Working on files version in the branch assigned

aleixrodriala commented 1 year ago

Fixed by #10