JsExe 1.0.2 - JavaScript demo packer
by Charles Boccato (cb / adinpsz), 2012

=== Presentation ===

JsExe is a demo-oriented JavaScript compressor. It takes as input a standalone JavaScript source file and produces an HTML source file which executes a JavaScript with the same behaviour as the input one. JsExe aims to produce the smallest HTML file, using the best combination of compression tricks, such as embedding JS code in a PNG image. It is getting really useful for 1k demos or larger.

In the default mode, here what JsExe does more specifically :

- It takes an JS file as input parameter.
- If it helps, the JS file is optimized using an improved version of Google Closure Compiler (with no line break, better float formatting, etc).
- File byte order is reversed or not (depending on whether it improves final compression rate or not).
- It embeds the resulting file in a PNG image (8-bit grayscale format, one or more rows).
- Then it uses the most efficient combination of PNG optimizer tools, among PNGOUT, OptiPNG, AdvanceCOMP and DeflOpt.
- Then the output PNG is stripped of CRC and IEND block.
- Finally the loader is appended to the output file.

In the loader, V is the name of canvas element and C is the name of its 2D context. By reusing this variables in your JS code, you have an access to an existing canvas element and its 2D context and do not have to create new ones (it saves a few bytes). Note that since WebGL and 2D canvases are not compatible, you can't get the WebGL context from V.

For each step of the compression chain, you can force a choice by using the corresponding command line parameter. Please execute JsExe.exe for more details.

Feel free to give me any feedbacks : cb@adinpsz.org

=== Changes from v1.0.1 to v1.0.2 ===

* Because of multirow PNG support there is no limit on input file size anymore.
* PNG color format choice has been removed. It is no more needed since the improved chain of PNG tools ("PNG script") produces the same results regardless of the color format. Thanks to AdvanceCOMP, DeflOpt and a better use of PNGOUT and OptiPNG, results are no longer dependent on the slight randomness of zlib compressor.
* For the same reason, selection of PNG optimizer has been removed, except for PNGOUT. The latter may still be used for test purposes, because it is much faster than new "PNG script" option.
* UI has been improved.

=== Greetings ===

* Gasman, Daeken, p01 for their bright ideas,
* Wullon as usual,
* Google, Ken Silverman, Cosmin Truta, Ben Jos Walbeehm, Andrea Mazzoleni for their tools.
