Hacker News new | ask | show | jobs
by cdancette 2963 days ago
Can you explain a bit more how this works? I am not familiar at all with these challenges

50kB to 4kB is a 10x compression, it doesn't seem that huge, what's the achievement here?

4 comments

From the author's comments:

"The uncompressed image is 12 times larger than the source code of the program which includes the image data and the complete decoder. The actual image data is 1220 byte long, which gives a compression ratio of 40. Using a JPEG-like algorithm would not be enough to reach this level of compression (the Lena image would be barely recognizable). So the algorithm is based on the latest advances in image compression."

http://www.ioccc.org/2018/bellard/hint.html

Achieving 10x compression in a 4kB program+data file hybrid is pretty hard to do.
From the author’s notes:

> The actual image data is 1220 byte long, which gives a compression ratio of 40.

Those 4k include the decoder source code and the C string representation of the image data