4 ms·
I've been working on this for a couple weeks, attempting to get it looking perfect and get it to 1kb. It's going to be going on stage at http://solskogen.no/ h
by daeken 15y ago
I've been working on this for a couple weeks, attempting to get it looking perfect and get it to 1kb. It's going to be going on stage at http://solskogen.no/ http://solskogen.no/ shortly, so I figured now is the perfect time to post.
As far as I know, this is the first ever case of a self-extracting PNG -- the file is a PNG that first is interpreted as HTML, which then unpacks the compressed code within the PNG to start the second stage. I plan to write a blog post about how I got the size down as far as it is, but feel free to ask any questions you may have, as I'd love to see this technique spread!
Edit: Requires Chrome and Firefox -- has been tested heavily on Windows and OS X, but this will eat your CPU and GPU alive.
- robflynn 15y agoPretty cool hack! I'm looking forward to the blog post. It doesn't seem to eat my processor too much. In Chrome with AMD processor it's sitting at about 25% CPU usage.
- daeken 15y agoThanks! It isn't too be on the CPU for most people, but for some reason it's eating a massive chunk of CPU-time for some people -- seems to be only in the latest Firefox nightlies, but i'm not seeing it here, so I'm unsure of what it could be.
- ktsmith 15y agoJust to add another token data point. I have it up full screen at 1920x1200. CPU usage is sitting between 50 and 75% of one core and GPU usage jumps back and forth between 40% for a few seconds and then 80% for a few seconds. This is using Chrome 14.0.814.0 dev-m
- notJim 15y agoDo you have a quad core CPU by chance? 25% is the max that a single-threaded process would use. (Someone please correct me if this is wrong, but at least this is the behavior I've observed.) That being said, this uses only 10-12% CPU on my quad-core machine.
- p0nce 15y agoIf it's 1k, then it's a serious contender.
- sgrove 15y agoDaeken... you are, as usual, nothing short of amazing. Never fail to amaze :)