Suborg information 28 glöps
- general:
- level: user
- personal:
- 32b MS-Dos PA!NT 16b
- Why did you call int 0x10 twice? Here's your pa!nt in just 14 bytes, source for nasm:
Code:BITS 16 mov al,0x12 mloop: int 0x10 mov ax,0x03 int 0x33 xchg ax,bx mov ah,0x0C jmp mloop
- rulezadded on the 2013-10-22 13:16:57
- demotool Linux PunkJS
- Btw, PunkJS output size also heavily depends on the libpng version installed in the system. While libpng 1.5 on Fedora 17 (at work) produced 1012-byte output, libpng 1.6 on Arch (at home) produced 976-byte output on the same input and with the same filter. So make sure to get as recent libpng as possible to get better compression. Probably far-future libpng 5 will collapse the script to a black hole. :D
- isokadded on the 2013-10-21 23:12:01
- demotool Linux PunkJS
- cb, I tested PunkJS-packed minigames on Chrome/Chromium 30+, FF23 stable, FF24 stable, Opera 12.12, Opera 12.16, IE9 and IE10, no problem anywhere. Are u sure the bug was in CRC check?
- isokadded on the 2013-10-21 23:05:02
- demotool Linux PunkJS
- Sorry, I meant IDAT chunk length but that doesn't really matter.
- isokadded on the 2013-10-21 21:18:13
- demotool Linux PunkJS
- The trick is to write <!-- sequence in place of IHDR chunk length and to write --> sequence in place of IDAT CRC. These things don't seem to be checked anyway, and almost entire binary gets commented in such a way. The chance of --> sequence occuring in the compressed binary is too low to be considered (if it does, one can tweak this issue manually)
- isokadded on the 2013-10-21 20:39:10
- demotool Linux PunkJS
- As for data: URLs, this is also a bit offtopic but I promised to tell about them. Although you can't pass them directly to tinyurl or 6g6.eu or other shortener that does no URL check (why not? you can of course, but Chrome and other WebKits will give a finger to every visitor and say ERR_UNSAFE_REDIRECT), you can create a gist, set up a simple client-redirect page like this (i call this DataWarp):
Code:<!DOCTYPE html><scr ipt>location=location.hash||"about:blank"</script>
...and then use a gist raw URL (thanks to bl.ocks.org) followed by a hash and your data: URL: http://[your.warper.url]#data:[your_data]
P.S. It's not always that simple (esp. with Chrome protection) but will do for most cases. - isokadded on the 2013-10-21 19:09:23
- demotool Linux PunkJS
- p01, nope. I started the research of why this demo (packed with jsExe, I might add) does not work in prestOpera (12.12 and 12.16) and why it unpacks so slowly at all. Then I found this notorious "getImageData-in-a-loop" but the question of presto incompatibility still bugged me.
After that, I found out that getImageData() does work but returns a typed array full of zeroes! And then I read about a bug that when you set src and onload attributes for <img>, then prestOpera and IE show buggy behaviour: onload fires before the image is actually loaded, that's why getImageData returns only zeroes. So I decided to add an external loop that actually waits for compelte image load.
P.S. And that is why I think Presto and Trident must die, but this is offtopic... - isokadded on the 2013-10-21 18:32:24
- demotool Linux PunkJS
- Do you know what onerror=src=location is for? In some browsers, it's the only way to start the bootstrap when the file is loaded from data: URL. I think you can safely omit this line if you don't need this functionality but when I export the HTML to data: URL and it stops loading, it seems really strange to me. I also know the external "for" loop could easily be dropped but it was added _just_ to support Opera/IE that fire image onload event incorrectly. This is where I prefer to spend some extra bytes to get the load process never fail, no matter the circumstances.
P.S. And yeah, getImageData in the loop body is damn slow. - isokadded on the 2013-10-21 16:23:04
- demotool Linux PunkJS
- 2 p01:
If you have some toolchain like Cygwin/MSYS+MinGW, you can compile it on Faildows too. :) If anyone does a cross-compiled version (or even ports it to JS itself using Emscripten), it would be great. Maybe I'll do the latter some time later.
Compared to JsExe (you came from that thread, right?) it does not do pre-minification and other bells and whistles but does only one thing - compression - and does it well: it's far more robust (some tricks are used to prevent random garbage in PNG from breaking the parser) and the compiled HTML files were proven to work even in old (Presto-based) Opera and IE9.
It also generates dataURI-friendly output (so you can host your demos even without a hosting, but let's discuss the research on it later).
What's similar to JsExe is that there are global canvas object (Z) and 2d context (C) available to the input script right away.
After all, PunkJS is just an opensource quick proof-of-concept: all those wonders can be done with just libpng and no third-party dependencies. - isokadded on the 2013-10-21 14:31:05
- demotool Linux PunkJS
- PunkJS is a stand-alone tool to generate compressed HTML files that can be used in the demo production from your JavaScript input source.
Features:
- Compatibility with most Unix-like systems, no dependencies except libpng and libm
- Selective compression using 10 different options (the smallest result is output)
- Fast unpacking engine
- HTML output compatible with all HTML5-enabled browsers that support <canvas> element (even IE9)
- Robustness to sensitive characters that appear in compressed data
See README.nfo for details. - Compatibility with most Unix-like systems, no dependencies except libpng and libm
- isokadded on the 2013-10-21 13:02:29
account created on the 2013-10-16 23:01:50