I am writing a packet compression algorithm. I want to make a fast server for many players and to minimize bandwith, I need to maximally compress my packets.
I am using UTF-8, but I can pass characters with value 1024 or 2048 in them.
I thought that I would find maximum character size, then store information inside.
For instance if it was eight bit, I could send 8 binaries in just one character.
If I send a number, I don't want it just to be the characters'0-10' because that is inefficient.
0 is ascii code 48, and knowing I only wanted a range between 1-10, I could make use of the other four bits.
This should be simple, but I don't know the limits. Utf-8 shouldn't send anything higher than 255, but I am getting 2000+ codes if I send em
My string is s
How do I know my limits of bytes in a character sent, or any clues?