   Compression/Encryption Theory
  I am new to C++ and thought of a possible theory, as far as I know it doesn't exist, but I think someone could write a program to send common bits of code in hex form but in a single form... what I mean is insted of sending 01 FF someone who send that bit through an internet link constantly might program the program that receives it to look for just 01 or just FF and that would translate to mean a 01 FF ot the program... so that would cut the amount of information to half or less with a lot of information.In case you're curious as to why I am typing this, it's because if it doesn't exist I want developers to start doing this, it would act as an encryption and lower the amount of bandwidth needed for online gaming!because I have never heard of anyone having to send so much info they wouldn't be able to simplify it like this.Please let me know what you think or if anyone is already doing this, thanks for your input. :)   
  Most online games use some kind of compression for network packets, often considerably more sophisticated than what you suggest.   ;  What you are describing is a first and foremost a form of compression, not encryption. Although it can also be used for encryption (this is called a substitution cipher, a very old form of encryption used since Roman times), it is extremely easy to crack, and provides no security.Anyway, the compression method you describe has existed for a very long time, and is a basic form of what is called entropy encoding. In this basic form, it is not very useful, since the compression ratio is usually very poor. However, much more sophisticated forms of entropy coding have been createdover the years, such as Huffman compression. This has further been developed, eg. by adding adaptive components, finally leading to the common compression algorithms we know today (such as the one used by ZIP).If you like to play around with compressing your data, I'd suggest taking a look at zlib, which offers very good compression, and is easy to use.   ;  BTW, this has absolutely nothing to do with graphics programming, so I'm moving this to the beginner forum.;Quote:Original post by Cedar so that would cut the amount of information to half or less with a lot of information.According to Information Theory, it would reduce amount of data, but retain the same information.Quote:it would act as an encryption and lower the amount of bandwidth needed for online gamingBoth, compression and encryption are an encoding. They take one set of symbols, and convert it into another set. Web-based clients can use SSL encryption, optionally combined with gzip for compression. And these are just standard protocols provided in scope of common HTTP services. Proprietary online games use custom encryption, authentication and compression.Quote:because I have never heard of anyone having to send so much info they wouldn't be able to simplify it like thisEveryone who has to deal with low-bandwidth connection use some form of network encoding.What matters is not the data, but amount of information to send. If you already receive optimally encoded data (ZIP), you cannot compress it any further without permanently damaging it (jpg).As for simplification, it depends. Sometimes it's undesirable, for example in computing clusters. There you're dealing with tera, even peta-bytes of data, but rather than storage, access rates are a premium.Quote:Please let me know what you think or if anyone is already doing thisUnfortunately, you've been beaten. Claude Shannon was the first to set formal and theoretical foundation of information theory, which among many things, is a foundation for compression, and some smaller parts of encryption.   ;  On a more positive note; if you think up something and later find it has already been done, you probably had a good idea to start with at least ;)   