lua-users home
lua-l archive

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


>I tried to convert scripts into bytecode but they sometimes take more
>place than in source form.

This unfortunate, but the main goal in precompiling is speed of loading
not compression. Have you tried stripping debug information (luac -s)?

>Comments and extra whitespaces could be removed to save space, also
>many keywords can be replaced with numeric id's. I think the best
>solution would be to store output of lexer in a compressed form (1
>byte for each token id and also strings or numeric values if needed).

Back in the very old days, before luac, we had something like this. But it
did not help much because most of the time was spent converting real numbers
(we wanted to reduced the load time of large graphics files, which had many
real numbers).
--lhf