News for hackers. Stuff that matters.
Re:Biggest image in the smallest space by DanBC on Wednesday September 02, 2015 @08:16AM (#10158660)
That's impressive. Here are some other compression curiosities.

http://www.maximumcompression.com/compression_fun.php

A 24 byte file that uncompresses to 5 MB; another file with good compression under RAR but almost no compression under ZIP; and a compressed file that decompresses to itself.

Re:Biggest image in the smallest space by rwmj on Wednesday September 02, 2015 @09:49AM (#10159089)
This isn't a decompression bomb, but here are some fun virtual disk images I found using AFL fuzzer. One of the files is 329 bytes, but causes qemu to consume 4 GB of heap trying to process it. This has interesting consequences for the public cloud, where people can upload any old stuff and it is usually processed immediately by 'qemu-img'.

https://bugs.launchpad.net/qemu/+bug/1462949

(I have a big collection of these, but most of the bugs have now been fixed in qemu)

Re:Biggest image in the smallest space by sulami on Wednesday September 02, 2015 @08:45AM (#10158789)
The file that decompresses to itself is a work of art. How does one even go about to create something like this?
Re:Biggest image in the smallest space by nanofortnight on Wednesday September 02, 2015 @08:58AM (#10158861)
Re:Biggest image in the smallest space by quarterto on Wednesday September 02, 2015 @08:52AM (#10158818)
Like this: http://research.swtch.com/zip. Fascinating read.
Re:Biggest image in the smallest space by Cyph0n on Wednesday September 02, 2015 @09:35AM (#10159014)
Written by THE Russ Cox?
Re:Biggest image in the smallest space by DanBC on Wednesday September 02, 2015 @08:52AM (#10158820)
I have no idea.

There are people who take special interest in compression. The Hutter Prize would be a good place to find them. http://prize.hutter1.net/

It's a bit old now.

> Restrictions: Must run in <10 hours on a 2GHz P4 with 1GB RAM and 10GB free HD

I'd be interested to see what can happen without those restrictions.

Re:Biggest image in the smallest space by ars on Thursday September 03, 2015 @03:12PM (#10166938)
> I'd be interested to see what can happen without those restrictions.

If you did not have time limits you could exhaustively search through Pi looking for your data, then store just the offset into Pi.

Or if the offset got too large then Pi to the power of lots of random numbers. One of those numbers will, somewhere, have your data. But it's infeasible to search for it.

Re:Biggest image in the smallest space by TheLoneWolfling on Saturday September 05, 2015 @10:05AM (#10174842)
A common misconception.

There is no universal compression algorithm, by the pigeonhole principle.

And your compression scheme won't work by the simple fact that the offset of where in Pi your data lies will, on average, take the same number of bits to store as the data itself. Ditto, with pi to the power of lots of random numbers, the offset and the power will, on average, take the same number of bits to store as the data itself.

Re:Biggest image in the smallest space by Filligree on Wednesday September 02, 2015 @09:43AM (#10159050)
I'll add mine: https://brage.info/hello

It's a 1MB file that decompresses to 261 tredecillion bytes of "Hello, World".

No terribly clever stream manipulation; it's a perfectly normal gzip file, other than the size. The generation script is here: http://sprunge.us/VhFc, but see if you can figure it out without peeking.

Re:Biggest image in the smallest space by sbierwagen on Wednesday September 02, 2015 @10:39AM (#10159481)
Warning to my fellow chumps: that is a direct link to the gzip bomb. Clicking on it causes a download, which results in Windows Defender promptly losing its mind as it tries to decompress the whole thing looking for viruses. (win 8.1)

Interestingly enough, it's not using up any memory, but it is hitting the disk at 55MB/s, so I'm guessing it's decompressing it to disk, and will eventually crash when it fills up my hard drive.

EDIT: It gave up after fifteen minutes. That's nice, now I don't have to reboot. There was about 2 gigabytes of stuff in my temp folder when I ran disk cleanup, don't know how much of that was gzip bomb output.

Re:Biggest image in the smallest space by dredmorbius on Wednesday September 02, 2015 @04:56PM (#10161848)
May I suggest for the merely curious:

    curl https://brage.info/hello | od -c | head -40
Re:Biggest image in the smallest space by orangepenguin on Wednesday September 02, 2015 @04:09PM (#10161610)
Is that short or long scale tredecillion?
Re:Biggest image in the smallest space by kuschku on Wednesday September 02, 2015 @09:48AM (#10159080)
Actually, it decompresses into a 1.4MiB file, which decompresses into another 1.4MiB file, recursively.
Re:Biggest image in the smallest space by Filligree on Wednesday September 02, 2015 @04:29PM (#10161708)
I sized it to fit on a floppy disk. :-3

But, no. There's a finite number of levels, and it blows up pretty quickly.

Re:Biggest image in the smallest space by aidenn0 on Wednesday September 02, 2015 @12:21PM (#10160299)
Malware scanners that search inside archives really love zips that decompress recursively forever.
Re:Biggest image in the smallest space by TheLoneWolfling on Saturday September 05, 2015 @10:11AM (#10174853)
Here's a fascinating thought.

It should be possible to write an archive file that decompresses to a slightly different archive file. Say, the original archive file plus a zero byte. (Things get hairy because of the checksum in most archive file formats, but it still should be possible.)

Then a malicious party writes an archive file that decompresses to two slightly different archive files. And sets it up so that, say, 128 levels in iff you follow a specific path in said tree you get to the actual malicious content. You can't get to it unless you follow the specific path, and you can't find it unless you do substantially more than just naively decompressing files (as you won't be able to decompress 2129-1 files).

Re:Biggest image in the smallest space by Hugie on Wednesday September 02, 2015 @02:35PM (#10161155)
Maybe someone takes the recursive file to a new level and creates one that generates to n new identical files. So decompress to a tree.
Re:Biggest image in the smallest space by TheLoneWolfling on Saturday September 05, 2015 @10:13AM (#10174856)
Better yet: a file the decompresses to multiple slightly different versions of itself. Say, one that is a version of itself with an additional one, and one that is a version of itself with an additional zero.