Live data from Hacker News

Biggest image in the smallest space

bamsoftware.com

11–20 of 106 posts

Re: Biggest image in the smallest space

#11

That's cool. Presumably the same "attack" could be applied to any file format that uses DEFLATE. From a legal stand-point, I'd be wary about following through with the authors suggestion of "Upload as your profile picture to some online service, try to crash their image processing scripts" without permission. Sounds like a good way of getting into trouble.

Yes, but on the other hand it's a good reminder for everyone processing user provided files to sanity check or convert them to a canonical format in a sandboxes and resource limited process.

Re: Biggest image in the smallest space

#14
post #8

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.

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

#16
post #14
post #8

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.

The file that decompresses to itself is a work of art. How does one even go about to create something like this?

Like this: http://research.swtch.com/zip. Fascinating read.

Re: Biggest image in the smallest space

#17
post #14
post #8

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.

The file that decompresses to itself is a work of art. How does one even go about to create something like this?

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 I'd be interested to see what can happen without those restrictions.

Re: Biggest image in the smallest space

#18

Is there a way to check for decompression bombs? I'd like my software to be able to unzip zip files safely.

Monitor zip files as they decompress. Halt decompression process if the size ratio between zip file and decompressed file exceeds a fixed ratio (for example, if ratio between the file sizes is something like 10:1).

Re: Biggest image in the smallest space

#19

Reminds me of how you could crash a fido node by sending them some big empty files, so when they got automatically unzipped the filled of the harddrive :)

I think this kind of thing was common even a few years ago in DoS'ing mail gateways that uncompressed and scanned various archive formats. Things like really huge files when uncompressed or ridiculously deep nested directory structures.

I think most software these days is immune to such tricks, or at least has tunables to reduce the chance of such tricks causing harm.

Post reply on HN