lua-users home
lua-l archive

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

On 10/12/2010 12:16 PM, David Manura wrote:
On Mon, Oct 11, 2010 at 10:06 PM, Matthew Wild wrote:
On 12 October 2010 02:41, David Manura wrote:
  Some quick tests here indicate that uglify slightly
increases file size in the presence of gzip...

I'd be interested in sample files that demonstrate this if you have
them. From my own tests running through uglify strips another 1K from
a squished Penlight and slightly aids gzip decompression time.

$ cat /tmp/lua-5.1.4/test/*.lua>  test.lua
$ squish --uglify --gzip>  /dev/zero&&  ls -la test
... 6389 ...
$ squish --gzip>  /dev/zero&&  ls -la test
... 6244 ...

$ cat /tmp/penlight-0.8/tests/*.lua>  test.lua
$ squish --uglify --gzip>  /dev/zero&&  ls -la test
... 10685 ...
$ squish --gzip>  /dev/zero&&  ls -la test
... 10461 ...

Good demo. This was one important data point that was missing from the graph Matthew showed. Would be interesting to see Matthew's results, or an updated graph.

So LZ compression does negate most of the difference once both samples are compressed, plus uglify will increase the size of the Huffman table and its encoded form. Also probable is an increase of short LZ matches, reducing bytes saved and causing more literals, also reducing compression efficiency.

Interesting data... An application with tons of source code can probably do very well by normal squishing followed by lzma.

Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia