Pondering Data Compression.

Status
Not open for further replies.
If you were to compress a text file for example, you would find redundancies within the text, compress the file, and then create a dictionary that would instruct the file how to decompress. The problem is that the dictionary itself can take up a significant amount of space. I was thinking how it would be possible to remove the dictionary from the compressed file, and then just have the compressed file with no instructions of how to decompress it (i.e remove the dictionary).

Hypothetically let's say you wanted to send that compressed file without a dictionary over the internet, it would be significantly smaller and easier to download. The problem now is how to decompress the file without a dictionary. I was thinking about using some kind of "check-file" attatched to the compressed file that could instruct a program how to reconstruct the original dictionary file, and then decompress the main file.

So, what you are trying to do is create a check-file that is associated with the compressed file that would instruct a program how to rebuild the original dictionary file that you excluded. This would mean that there is less data to send over the internet, and the actual instructions for decompression are figured out by the PC of the person who downloads the file.

What needs to be figured out is some way to create an association between the check-file and the compressed file that would make the contents of the original dictionary file obvious, so that the dictionary could be rebuilt. The check-file could be created when the original dictionary file is created, and it could therefore contain instructions of how to rebuild that dictionary file.

Just a thought.
 

MrMills

Ars Praefectus
3,727
Moderator
So you're saying that this check file would be smaller than the dictionary? Why not just recompress the dictionary?

My instinctive reaction is "there ain't no such thing as a free lunch" -- it's difficult to replace a certain amount of information with another smaller amount of information sufficient to reconstruct the first. And if such a technique existed, it would already be incorporated into existing compression products.
 
Originally posted by MrMills:
So you're saying that this check file would be smaller than the dictionary? Why not just recompress the dictionary?
QUOTE]

I think you mean creating a dictionary within a dictionary? So, you want to find actual rendundancies within a dictionary. You could keep doing this, but it is probable that there would be a limit as to how many times you could do it.

My idea with the check-file checks the dictionary against the check file as it gets rebuilt. The check-file is instructions on how to rebuild the dictionary, but it uses the compressed file to help it rebuild the dictionary. So it is the relationship between the check-file and the compressed file that would rebuild the dictionary, not just the check-file alone.
 
"The check file cannot be smaller than the dictionary itself"

I think that's what MrMills is getting at (at least I hope so), because it's true. Just as an example, take Huffman encoding. The "dictionary" is a list of prefix encoded values. That means that the dictionary cannot be made any smaller, because it's actually composed of a single copy of each of the smallest atomic elements.

Nice thought, though.
 

MrMills

Ars Praefectus
3,727
Moderator
I don't think broadband will make JPEG2000 obsolete. For one thing, most folks still use modems, and that's not going to change any time soon. And even if people don't want their images to fit in 1/10th the JPEG size, they can just up the image quality.

I wish I knew what was holding it up, honestly. I saw implementations of it back in 2000. Backwards compatibility? Useless extra features? Multiple layers? sigh
 
Just look at how long it took PNG to become (mostly) supported and (a little) used: several years. Now you're talking about a lossy format which is probably more complex, has more implications, ramifications, etc.

That said, the only place I could see it being useful any time soon is in digital cameras. Transfer software could always offer an option to convert to standard JPEG on download. But then, vendors have had other better compression schemes available for years... and I don't think many are using them. There could be a few reasons:

1) Backwards compatibility. It's nice to transfer the files and open them with anything. It's also easier to implement established technology.
2) Power. Better compression requires more processing power. You won't notice the difference on your PC (a few ms more), but you will notice the reduced battery life / much longer compression time of your portable device.
3) These guys are in the hardware business. They don't mind selling more memory.
 

MrMills

Ars Praefectus
3,727
Moderator
This reminds me of a friend of mine who was always working on the ultimate data compressor: one which could figure out the pattern behind a file and use that to squeeze all entropic data out of it. He'd point out that all non-trivial data was not random; that programs resulted from logical thought processes, that music resulted from order ...

It was entertaining to listen to him, but so difficult to explain just how unfeasible his theories were ...
 
Just go look for the holy grail - find a way to compress random data. It will drive you batty. I'm sure someone will bring up the point of namespaces and number theory and that's just not possible. It's possible, just highly highly unlikely. (Random number generation jumps to mind but just trying finding a generator(s) that can generate all the possiblilities you need and still use less bytes than the original data [ramble, ramble, ramble]).
 
Originally posted by MrMills:
This reminds me of a friend of mine who was always working on the ultimate data compressor: one which could figure out the pattern behind a file and use that to squeeze all entropic data out of it. He'd point out that all non-trivial data was not random; that programs resulted from logical thought processes, that music resulted from order ...

It was entertaining to listen to him, but so difficult to explain just how unfeasible his theories were ...

Sounds interesting.
 
Status
Not open for further replies.