Jump to content
  • Advertisement

SamLowry

Member
  • Content count

    913
  • Joined

  • Last visited

Community Reputation

1865 Excellent

About SamLowry

  • Rank
    Advanced Member
  1. SamLowry

    data compression

    I see compression as essentially just rearranging bits, or at least their meaning.   'A' is normally (too lazy to check though) encoded by the bitstring '1000001'. What if I choose to represent it by '01010101' instead? It's perfectly possible, I would just have to two swap things around. Is it useful? Not really. But what if I choose to replace the bitstring '10000001' with just '1'? I would need to rearrange a lot more to make it work (ie without introducing ambiguities), but it can be done without too much trouble. This way, I can encode data with a lot of A's much more efficiently: all A's need 8x less bits.   Compression is about remapping the meaning of bits so that a given piece of data turns out be represented with less bits than before.   Of course, you could choose to encode your entire hard drive with a single bit; it is a valid remapping. The problem is that you need to store the remapping somewhere, and that would just amount to having a hash table that maps '1' to <your entire HD data>. So you lose instead of gain. This means that it is important for compression that the remapping itself can be described procedurally.   The part where one says 'you cannot just create information out of nothing' can be found in the remapping: in order to represent 'A' by '1', one has to make a lot of sacrifices. In the case of this example, in order to represent A with one bit, all other characters will require 9 bits. So from this standpoint there is no gain to be made. But since you use the remapping to reencode data, compression is actually possible.
  2. SamLowry

    What Are Your Opinions About Various Languages ?

     Never compare C++ any language to Java when referring to line count - C++ looses every time with all of it's tedious class declarations and header files. Java loses due to its maddening verbosity.   I find it strange that C# works against you, as the language is essentially an improved superset of Java. What exactly bothers you? Anyway, IMO, C# is what java should've been: a language with a consistent type system, generics that work, type inference, support for functional programming, a (more) coherent library, ...
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!