|
| quote: | Originally posted by trance_n_dance
Well I dunno maybe it's something few people have or an old DOS program. Considering there are lots of things on the net that not everyone has |
Consider this: if this program, that could cut file sizes in half no matter what file you gave it, existed, try applying it again and again, until you ended up with a file of 1 byte, say. There's 256 possible value assignments for such a file and thus only 256 representable original files. So - since there's a lot more files - several files would be compressed to the same byte and the decompression algorithm would have no way of knowing what file to decompress back into.
Consequently such a compression algorithm cannot exists.
This is called the counting argument. I've done projects on compression at the university I attend, and can assure you that it does hold.
There are basically four kind of compression algorithms in use today:
1: Enthropy-based unique prefix coding (such as Huffman codes), which replaces every symbol in the source file with a code of varying length according to the frequency with which the symbol appears. Normally you can gain about 40% reduction in filesize using this technique.
2: Run lenght encoding, which simply replaces long runs of similar symbols, with a single copy along with a counter. Reduction is about 25% for your typical file.
3: Lemple-Ziv sliding window algorithms, which searches the previously encountered part of the file for occurences of the next x symbols, and replaces them with a reference to the previously encountered occurence. Reduction is usually about the 55% mark, but it does vary a lot.
4: Lossy compression, which removes true information from the file. A lot of techniques exists for this, but they all ruthlessly exploit shortcommings in our senses, so the loss isn't noticeable to ordinary humans. Reduction can reach over 99.5% in cases such as uncompressed video.
Most standards use a variety of these techniques. Mpeg, for instance, use all but the Lemple-Ziv methods. Generally, WinRAR has very good reduction ratios, but like all other programs, files containing little redundancy cannot be compressed further.
I hope some of this made some sense and you won't spend a lot of time searching for that super-compressor.
|