lua-users home
lua-l archive

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


Hi all,

LuaSrcDiet reduces the size of Lua 5.1.x source files by aggressively removing all unnecessary whitespace and comments, optimizing constant tokens, and renaming local variables to shorter names.

New location: http://code.google.com/p/luasrcdiet/

Version 0.12.0 main changes:
* BUG FIX: String optimization of "\ddd" -- "\00101" was incorrectly optimized to "\101".
* Added --opt-srcequiv: Source lexer stream equivalence checking.
* Added --opt-binequiv: Binary chunk equivalence checking.
* Single-file versions of LuaSrcDiet in various sizes.
* --opt-experimental: Experimental optimizations:
 (a) Semicolon (';') operator removal
 (b) Function call syntax sugar optimization.
* Some documentation files.

The important change is the addition of source lexer stream and binary chunk equivalence testing. This provides better assurance that a size-reduced file will still work in the same way.

The single file LuaSrcDiet.lua is 157KB in size, which reduces to 41.3KB using maximum and experimental settings.

I am planning for one more update before shifting focus to Lua 5.2.x. The update will add (a) simple local keyword removal and (b) user directed name replacement.

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