0

I was wondering if what I have in mind already exists in any known compression programs/algorithms or not. We know that Seed gives us constant sequence of random numbers. so if we be able to find seed that say generate those bytes then we can compress files into just 1 magical seed that reproduces our data bytes!

In other words we can assume sequence of bytes a randomly generated numbers, if we find a seed for that sequence we can pack those bytes into single seed number.

Well of course probability of finding seed for large data bytes is very low or even impossible due to size of seed and use of PRNG, but we can do this in chunks, eg. 10 bytes per seed to increase the chance of finding good seeds.

There is another way, we could shuffle data bytes of compressed file with random seed, and try compressing again. shuffled data can contain more repeating patterns if data bytes are not all different. (this could be done in chunks too to increase chance of finding good seed)

Another way, we could add/subtract random numbers (salt?) into our data byte using good seed in way that results in more redundancy, and then compress it again. (this could be done in chunks too)

We could have matrix form of byte array to distribute bytes in wider range.

We could have mix of ways I provided. we could have AI that chooses best mix of these approaches.

we could do this over and over, compress, randomize, compress randomize until it reaches very small size. of course we need to keep header of file somewhere that records this actions, but size of header should be smaller than compressed file.

I think this will defeat the pigeonhole principle by just finding good seeds, though it is expensive, I just wanted to share this idea and I was wondering if such thing is already considered somewhere or is it even implemented yet? Is this even considered practical?

I appreciate comments by experts at this field because I'm not experienced over this. so bear with me. Thanks in advance.

4

This will not work. A given n-bit seed can only produce at most 2^n distinct sequences. I.e. for m-bit data where m > n, there will be data bit patterns that are produced by no seed. Adding extra information to the seed like offsets, shuffling, etc. will require extra bits, and can't lead to more possible data sequences than just choosing a larger seed. In general, the size of the seed must be the same as the size of the data.

I encourage you to look into basic Information Theory, importantly the concept of entropy. In practice, most data sequences we want to compress are not random, i.e. the data contains fewer bits of “information” than are used for storage of that information. Compression is about distilling the data down to this incompressible information.

One general approach is that frequent patterns have smaller encodings than infrequent patterns. This might also mean that the “compressed” form of data that cannot be compressed any further might be larger than the original data! There is nothing about using random seeds that lends itself to finding and removing frequent patterns.

  • Now this makes sense with your explanation in mathematic world, because when i wrote algorithm for finding seed for sequence it was impossible to find anything for more than 4 length sequence. Or it would literally take ages to find if not impossible . – M.kazem Akhgary Aug 26 '17 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.