chippydip:
The problem with the code posted near the end of page 9 is that you are openning the file in text mode. Use istream("foo.bar",ios::binary) or similar.
MP3-Beating Compression
April 17, 2000 04:07 PM
There seems to be some lack of understanding about how rearranging bits may improve compression.
Take the simple example of an unaltered WAV file. Looking at the sampled audio data''s bit patterns (for 8-bit or 16-bit recordings) would show that for a given consecutive sequence of bytes, the Most Significant Bits of the data word fluctuate slowly, while the LSBs fluctuate rapidly and almost erratically.
This is key: knowing that classic compression works on 8-bit bytes, we want to group data such. For 16-bit data, we want to take the MSBs of 8 consecutive 16-bit words and group them into a signle byte. Do so for the entire file, but take all of the bytes containing the MSBs of the original data and put them at the front of the file, followed by the next most significant, and so on. You create a file that is very orderred at the front, and very erratic at the back.
The question: will the advantages of superb compressibility of the first parts of this file outweigh the disadvantages of horrible compressibility found at the end?
Take the simple example of an unaltered WAV file. Looking at the sampled audio data''s bit patterns (for 8-bit or 16-bit recordings) would show that for a given consecutive sequence of bytes, the Most Significant Bits of the data word fluctuate slowly, while the LSBs fluctuate rapidly and almost erratically.
This is key: knowing that classic compression works on 8-bit bytes, we want to group data such. For 16-bit data, we want to take the MSBs of 8 consecutive 16-bit words and group them into a signle byte. Do so for the entire file, but take all of the bytes containing the MSBs of the original data and put them at the front of the file, followed by the next most significant, and so on. You create a file that is very orderred at the front, and very erratic at the back.
The question: will the advantages of superb compressibility of the first parts of this file outweigh the disadvantages of horrible compressibility found at the end?
April 17, 2000 04:09 PM
P.S. The process for creating the file to be fed to the compressor can be exactly reversed to perfectly reproduce the original.
April 17, 2000 04:16 PM
P.P.S. (I just keep rambling). Although I don''t believe that kieran''s algorithm can compress compressed files better than non-compressed, it may be possible. If the compressor is Huffman, forget it. It emits variable-length bit sequences that probably wouldn''t benefit from this. Last I heard, pkzip and co. use Shanon-Fano trees, which are similar to Huffman.
However, LZ algorithms typically emit 9 or 12 bit codes. If I was mistaken, and WinZip is using an LZ derivative, it is conceivable (especially assuming 12-bit codes) that this algorithm would find patterns to compress, considerring that many tokens in the LZ dictionary may never be emitted, or that the most popular ones would receive the loweset codes (producing the 4 MSBs of a lot of 0000 (for uncompressed tokens), some 0001, less 0010, and so on.
However, LZ algorithms typically emit 9 or 12 bit codes. If I was mistaken, and WinZip is using an LZ derivative, it is conceivable (especially assuming 12-bit codes) that this algorithm would find patterns to compress, considerring that many tokens in the LZ dictionary may never be emitted, or that the most popular ones would receive the loweset codes (producing the 4 MSBs of a lot of 0000 (for uncompressed tokens), some 0001, less 0010, and so on.
April 17, 2000 04:23 PM
chippydip, an other problem with your program is that you declared nextbyte as char and not as unsigned char, because you wrote ''while (nextbyte > 0)''. char could be < 0.
Visit our homepage: www.rarebyte.de.st
GA
Visit our homepage: www.rarebyte.de.st
GA
Sorry it''s been a while since I last posted. I was in on the first few pages, but then I gave up. So, that brings me here to this 10th page.
Basically, I still find Kieren_J''s claims about as true as any release date on Daikatana. In fact, it''s almost offensive that it has been carried on this far. I''m even going to throw all those other fools who think that Kieren may be correct in on this. You''re all blind to the truth! Somewhere''s on page 5 or 6 there was a great link to a compression messageboard log. In that, pigeons once again become the argument of reason. You cannot fit 16 pigeons through 15 holes without using the same hole twice. Kieren''s algorithm will simply not work 100% of the time, and in order to compress 16:1, there has to be a case where he actually increases the size 1:16 (assuming that he just doesn''t say "screw it! I''m not gonna compress this file since it breaks!") Seeing reasonable people fall for the stream of crap flowing from Kieren''s keyboard makes me want to go club baby seals while wearing a fur coat.
Anyway, as a measure against this silliness, I''ve started an Internet banner campaign against this. You can find it at www.PeopleAgainstStupidPeople.com. Just click on the link on the main page that is title "Grandeose Compression Claims", and you can then download the ribbons, clip-art, banners, and find links to other sites that are putting people that believe this crap to shame.
Pythius
Basically, I still find Kieren_J''s claims about as true as any release date on Daikatana. In fact, it''s almost offensive that it has been carried on this far. I''m even going to throw all those other fools who think that Kieren may be correct in on this. You''re all blind to the truth! Somewhere''s on page 5 or 6 there was a great link to a compression messageboard log. In that, pigeons once again become the argument of reason. You cannot fit 16 pigeons through 15 holes without using the same hole twice. Kieren''s algorithm will simply not work 100% of the time, and in order to compress 16:1, there has to be a case where he actually increases the size 1:16 (assuming that he just doesn''t say "screw it! I''m not gonna compress this file since it breaks!") Seeing reasonable people fall for the stream of crap flowing from Kieren''s keyboard makes me want to go club baby seals while wearing a fur coat.
Anyway, as a measure against this silliness, I''ve started an Internet banner campaign against this. You can find it at www.PeopleAgainstStupidPeople.com. Just click on the link on the main page that is title "Grandeose Compression Claims", and you can then download the ribbons, clip-art, banners, and find links to other sites that are putting people that believe this crap to shame.
Pythius
"The object of war is not to die for your country, but to make the other bastard die for his"
hey we are still waiting for your DEMO !!
If it works, i will turn gay and suck your dick *g*
If it works, i will turn gay and suck your dick *g*
i am the 2 between 0 and 1
Oh BOY! this is getting much more entertaining
You can include me in the theirs no damn way this program will every work section. The only thing this thread has managed to do is identify the truly intellegent people from the galacticly stupid as mentioned in "a few good men".
I''m not going to go into explaining as there have been plenty of perfectly good explanations.
And just to make clear my position I''ll make my own analogy, theirs a better chance of me winning the lottery perpetually for all eternity than this program working as it has been stated....
You can include me in the theirs no damn way this program will every work section. The only thing this thread has managed to do is identify the truly intellegent people from the galacticly stupid as mentioned in "a few good men".
I''m not going to go into explaining as there have been plenty of perfectly good explanations.
And just to make clear my position I''ll make my own analogy, theirs a better chance of me winning the lottery perpetually for all eternity than this program working as it has been stated....
Thanks, EB. I''m so glad that there are always people around who are willing to take potshots at those with differing opinions or assertions.
Lack
Christianity, Creation, metric, Dvorak, and BeOS for all!
Lack
Christianity, Creation, metric, Dvorak, and BeOS for all!
It wouldn''t be so bad if people would actually look at the arguments against it. Its like 1 side arguing with proofs, mathematics, or otherwise and the other side arguing with "nuh-uh". No matter how much you want to believe it, it is simply an impossibility. And will never EVER happen.
Either 1 of 5 things are occuring
1
Everyone overlooks things, or has one thing in their mind they thought was true and will continue to missunderstand until that one thing is discovered. Often times you don''t even think about it, and are basing all arguments on this one simple "fact" that isn''t the case.
2
Your just plain delusional and want it to be true so bad are refusing to listen to arguments
3
You don''t feel like thinking about it and just want to argue
4
Your brain is wired wrong and the logical area of the brain can''t inform the memory part of your brain that it has discovered the problem.
5
Your not actually a human and are incapable of understanding.
Personally, I find it unfathomable that even 1 person believes such a rediculous claim and this whole thing can be pretty much well sumed up with the very first reply to the topic... that is:
it is a little later for april fools.
I would love to make one of those form letters... you know:
I am replying to you because:
[ ] You missunderstood me.
[ ] You called me but I wasn''t home.
[x] You have no brain and I feel like voicing my displeasure at your existance.
[ ] Your dog left its feces in my yard again.
[ ] Would you like fries with that.
I think you should:
[ ] resend your message after verifying your source.
[ ] have a beer.
[ ] get me a beer.
[ ] get that crap outta my yard.
[x] shut up and go to school.
Remedy the situation before I:
[ ] come over to your house and beat the crap out of you.
[ ] have a beer.
[x] need a shrink to repair the damage you cause to my brain.
[ ] sue your a__ outta the country.
[ ] other:_______________
There I created a short one, but that was my first... I''m sure someone could come up with something better than that to describe this situation.
Either 1 of 5 things are occuring
1
Everyone overlooks things, or has one thing in their mind they thought was true and will continue to missunderstand until that one thing is discovered. Often times you don''t even think about it, and are basing all arguments on this one simple "fact" that isn''t the case.
2
Your just plain delusional and want it to be true so bad are refusing to listen to arguments
3
You don''t feel like thinking about it and just want to argue
4
Your brain is wired wrong and the logical area of the brain can''t inform the memory part of your brain that it has discovered the problem.
5
Your not actually a human and are incapable of understanding.
Personally, I find it unfathomable that even 1 person believes such a rediculous claim and this whole thing can be pretty much well sumed up with the very first reply to the topic... that is:
it is a little later for april fools.
I would love to make one of those form letters... you know:
I am replying to you because:
[ ] You missunderstood me.
[ ] You called me but I wasn''t home.
[x] You have no brain and I feel like voicing my displeasure at your existance.
[ ] Your dog left its feces in my yard again.
[ ] Would you like fries with that.
I think you should:
[ ] resend your message after verifying your source.
[ ] have a beer.
[ ] get me a beer.
[ ] get that crap outta my yard.
[x] shut up and go to school.
Remedy the situation before I:
[ ] come over to your house and beat the crap out of you.
[ ] have a beer.
[x] need a shrink to repair the damage you cause to my brain.
[ ] sue your a__ outta the country.
[ ] other:_______________
There I created a short one, but that was my first... I''m sure someone could come up with something better than that to describe this situation.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement