Quote:
|
Originally Posted by Aalfabob
RBayer checked over my code a little and found a little problem in it. In one of my if statements i put an = instead off an == which somehow through off the results.
|
That single feature of C syntax has probably caused more programs to fail than any other bug in the history of computing.
Quote:
|
...there must be a law to keep random data from being compressed (Not the way stated before with the n-1 or whatever it was).
|
I actually thought that explanation was quite well presented.
The "law" is pretty simple: you need a certain number of bits in order to represent a certain amount of information. If a file has redundancy, or repeating patterns, it contains less information than if it had no such patterns. The redundancy can be removed and the file can be represented in a smaller form. Text tends to exhibit statistical patterns. Executable programs and pictures and audio have other patterns. Truly random data by definition has no redundancy, and thus can't be compressed without losing information.