new file compression idea

BlitzPlus Forums/BlitzPlus Programming/new file compression idea

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I have been working on a file compresser for quite some time now. At one point I came to thinking about ways to compress files without the common pattern searching system. Around that same time, I was working on simple XOR encryption (I'm a hobbyist, not a pro so I don't stick to one project at a time). I started mixing up the two projects in my mind and sometimes got ideas for one program while working on the other. This confusion lead me to ask the following question: "If you XOR'd a file enough times using varying lengths of bit masks, eventually would not all of the data inside be set back to 0's?" If this is true then, I thought, it MAY be more space efficient to simply keep a small log of these XOR's than to use the standard compression methods. Is there any life in this idea? I know that it is a long shot, but I thought that it might be worth investigating... Also even with the billions of calculations most computers today do a second, it might not be worth the lengthy compression time. However, perhaps you could simply XOR the file just enough to bring out large patterns that the standard compresser could exploit. What do you pro's think about this?