I was just doing some research and wondering what would be the max. compression that you have heard of. Just more curios then anything else.
codeflash
I was just doing some research and wondering what would be the max. compression that you have heard of. Just more curios then anything else.
codeflash
http://en.wikipedia.org/wiki/Data_compression
There are a dozen or two different compression algorithms. Are you looking for lossless or lossy? What is it you're going to be encoding?
>what would be the max. compression that you have heard of
100% compression:
Code:#include <cstdio> #include <cstdlib> #include <iostream> #include <fstream> using namespace std; int main ( int argc, char *argv[] ) { if ( argc < 2 ) { cerr<<"usage: compress <filename>"<<endl; return EXIT_FAILURE; } if ( remove ( argv[1] ) != 0 ) return EXIT_FAILURE; return EXIT_SUCCESS; }
My best code is written with the delete key.
There are two kinds of compressions, lossy and lossless. If you compress using lossy compression there is no limit to how much you can compress your data (Prelude's example just throws the data away, which is 100% compression).
If you want to be able to recreate the exact data (lossless) the maximum compression depends entirely on the type of data. 100 GB of only zeroes can be compressed to a few bytes, but purely random data cannot be compressed at all.
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling
http://maximumcompression.com/
EDIT
On a less practical level, the maximum compression capable will converge on 100% for some data. Consider a run length encoder compressing a file containing a continous stream of millions of 'A' sI was just doing some research and wondering what would be the max. compression that you have heard of. Just more curios then anything else.
Last edited by MadCow257; 04-07-2005 at 04:16 PM.
I hesitate to post this, because I have nothing to substantiate it. I heard about a researcher that "folded" the data through "multiple dimensions" or somesuch. (Not sure how the hell thats supposed to work )
Apparrantly he got VERY good results (so good that the telecommunications companies squashed the research - they were afraid of being put out of business by this technique).
This, of course, is just hearsay. But interesting, nonetheless!
I code.
I think.
Ergo, I think in code.