lua-users home
lua-l archive

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


--------------------------------------------------
From: "Luiz Henrique de Figueiredo" <lhf@tecgraf.puc-rio.br>
Sent: Monday, July 05, 2010 1:29 AM
To: "Lua list" <lua@bazar2.conectiva.com.br>
Subject: Re: string.dump's result.

The length is given as an int before the actual string. You need to
know the endianess replace this correctly. But the above solution is
much cleaner.

Thank you for the tips and information. I actually like the second way, because I am using lua and string.dump the script, and in turn I compress the script (it's for
a system I'm using in my Autoplay Media Studio plugins.)

However, I have found the 12 bytes that specify information regarding the compressed file, like the lua version, endiannes etc. However first I guessed the length of the path
was a dword, thanks for this new info, now I can do this right!

I have managed to compress a 250k lua file, to a 35k compressed file. A procedure in my plugin then decompressed the data and loads it using loadbuffer. It increases
a bit speed in loading the luafile, and reduced the filesize of my plugin.

Bas.