3 ms·
So, this is a fun bit of tinkering and all, but I'd be more interested to see just how small HN could losslessly compress the Gutenberg plain text UTF8 file of
by DanBC 13y ago
So, this is a fun bit of tinkering and all, but I'd be more interested to see just how small HN could losslessly compress the Gutenberg plain text UTF8 file of Romeo and Juliet.
(http://www.gutenberg.org/cache/epub/1112/pg1112.txt http://www.gutenberg.org/cache/epub/1112/pg1112.txt)
Especially if you're using interesting techniques to build the dictionary.
EDIT: I got it down from 178983 to 44830 bytes, which isn't as impressive as I was hoping for.
EDIT2: Currently at 43,666 bytes which is a bit better.
EDIT3: 40,125 bytes.
- voltagex_ 13y agoNow there's a code golf challenge I can work with. Mind posting some of your techniques?
- DanBC 13y agoOh! At the moment I'm just using existing software (PAQ8 variants, and WinRK). WinRK is best so far. It's not free. It has a 30 day trial. (http://winrk.com/ http://winrk.com/)
- abecedarius 13y agoYou'd want to count the size of the decoder, like http://en.wikipedia.org/wiki/Hutter_Prize http://en.wikipedia.org/wiki/Hutter_Prize
- csense 13y agoYeah. You really need this caveat to avoid the loophole where you can compress anything to zero bytes by making the desired output a literal in your decompressor (which just ignores its input and prints the hard-coded literal). This could be considered a real-world application of "hello world" programs: Winning compression prize contests by blatantly abusing the rules.
- DanBC 13y agoWell, yes. Except the source text is tiny, so unfortunately all the software is pretty big in comparison. I love the Hutter Prize, and the various compression benchmark sites.
- abecedarius 13y agoIt's just pretty unconstrained without that kind of rule. And a decompressor that doesn't have to be fast can be tiny.
- csense 13y agoGeneral-purpose compressors for comparison: gzip : 66513 gzip -c9 : 66099 bzip2 -c9 : 53619 xz -c9 : 59572 Interestingly, bzip2 is the best. Often xz is better, but apparently not for this data.