lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Sun, Oct 10, 2010 at 12:34 PM, KHMan <> wrote:
> Looking at squish_penlight.png, one more good item to compare is "(full
> minify) (gzip)". This will (I think) compare compressed keywords versus
> compressed uglified keywords. I've done some testing in the past -- keywords
> compresses well, what more it's a large file, so the file size might end up
> quite close to the minimum of 27.6KB, perhaps under 35KB.

uglify's work, i.e. simple Huffman coding, is probably duplicated in
gzip (Deflate).  Some quick tests here indicate that uglify slightly
increases file size in the presence of gzip, the main reason probably
being that doing this embeds two Huffman tables and decoders.  These
maybe should be merged into a single option to select the compression

Since embedding the decoder enlarges small files, Squishy might omit
gzip and print a warning if it doesn't decrease file size.  Perhaps
there are occasions where a user would still want to force it though,
such as for consistency or obfuscation reasons, though the latter
allows other options like AES (

On Sun, Oct 10, 2010 at 12:52 PM, steve donovan
<> wrote:
> But of course it would be a very unusual program that managed to
> _reference_ all of a big library, so the cool thing is that the
> resulting squished program carries no dead code (or very little). A
> case where 'static linking' makes a lot of sense.

The static linking thing I've thought would be useful too.  People
currently do that manually on a small scale via copy/paste.

> It would be a cool idea to assemble a kit which could build a custom
> Lua interpreter with various necessary libraries like luafilesystem,
> luasocket, etc built in, depending on configuration.

...with the help of rockspec metadata.  I think I've mentioned before
that the squishy file could be partly constructed from rockspec data.
You could have rock-level (archive) operations like "squish a rock" or
"statically link two rocks, removing symbols".