Difference between revisions of "TLTools"

(Initial Version)
 
m (Oh, god, lvl1 headers look wrong)
Line 1: Line 1:
=TSerial=
+
==TSerial==
 
Converts tables into strings. That way you can save tables to files, or send them across a network. Currently only supports tables with keys that are strings or numbers, and values that are strings, numbers, tables, or booleans.
 
Converts tables into strings. That way you can save tables to files, or send them across a network. Currently only supports tables with keys that are strings or numbers, and values that are strings, numbers, tables, or booleans.
 
* ''TSerialize(table)'' returns a string of the Lua code which will recreate the table.
 
* ''TSerialize(table)'' returns a string of the Lua code which will recreate the table.
 
*To deserialize, use ''loadstring("table="..serial)()''.
 
*To deserialize, use ''loadstring("table="..serial)()''.
  
=TLibCompress=
+
==TLibCompress==
 
Can zip andd unzip strings, reducing their size. A good way to save bandwidth when sending strings across a network.
 
Can zip andd unzip strings, reducing their size. A good way to save bandwidth when sending strings across a network.
 
* ''TLibCompress.CompressLZW(string)'' returns a zipped string
 
* ''TLibCompress.CompressLZW(string)'' returns a zipped string
 
* ''TLibCompress.UncompressLZW(string)'' returns an unzipped version of a zipped string
 
* ''TLibCompress.UncompressLZW(string)'' returns an unzipped version of a zipped string
  
=Download=
+
==Download==
 
[http://github.com/Taehl/TLTools TLTools] on [[Github]]
 
[http://github.com/Taehl/TLTools TLTools] on [[Github]]
 
{{#set:LOVE Version=Any}}
 
{{#set:LOVE Version=Any}}

Revision as of 17:54, 11 October 2010

TSerial

Converts tables into strings. That way you can save tables to files, or send them across a network. Currently only supports tables with keys that are strings or numbers, and values that are strings, numbers, tables, or booleans.

  • TSerialize(table) returns a string of the Lua code which will recreate the table.
  • To deserialize, use loadstring("table="..serial)().

TLibCompress

Can zip andd unzip strings, reducing their size. A good way to save bandwidth when sending strings across a network.

  • TLibCompress.CompressLZW(string) returns a zipped string
  • TLibCompress.UncompressLZW(string) returns an unzipped version of a zipped string

Download

TLTools on Github