Difference between revisions of "TLTools"

m (Updated download links)
m (Updated download links)
Line 3: Line 3:
 
* ''TSerial.pack(table)'' returns a string representation of a table. The string is, in fact, Lua code.
 
* ''TSerial.pack(table)'' returns a string representation of a table. The string is, in fact, Lua code.
 
* ''TSerial.unpack(string)'' returns a recreation of the serialized table.
 
* ''TSerial.unpack(string)'' returns a recreation of the serialized table.
 +
 +
[http://dl.dropbox.com/u/3713769/web/Love/TLTools/TSerial.lua Download]
  
 
==TLibCompress==
 
==TLibCompress==
Line 9: Line 11:
 
* ''TLibCompress.UncompressLZW(string)'' returns an unzipped version of a zipped string
 
* ''TLibCompress.UncompressLZW(string)'' returns an unzipped version of a zipped string
  
==Download==
+
[http://dl.dropbox.com/u/3713769/web/Love/TLTools/TLibCompress.lua Download]
[http://dl.dropbox.com/u/3713769/web/Love/TLTools/TSerial.lua TSerial]  
+
 
[http://dl.dropbox.com/u/3713769/web/Love/TLTools/TLibCompress.lua TLibCompress]
+
 
 
{{#set:LOVE Version=Any}}
 
{{#set:LOVE Version=Any}}
 
{{#set:Description=[[Serialization]] and [[Compression]] tools written in pure Lua}}
 
{{#set:Description=[[Serialization]] and [[Compression]] tools written in pure Lua}}

Revision as of 12:19, 10 August 2011

TSerial

Converts tables into strings. That way you can save tables to files, or send them across a network. Currently supports tables with keys that are strings, numbers, or booleans, and values that are strings, numbers, tables, or booleans. Functions, userdata, and circular references aren't supported.

  • TSerial.pack(table) returns a string representation of a table. The string is, in fact, Lua code.
  • TSerial.unpack(string) returns a recreation of the serialized table.

Download

TLibCompress

Can zip and unzip strings, reducing their size. A good way to save bandwidth when sending strings across a network. Please note: Do not write compressed strings to a file, since they can't be read correctly by Love 0.7.0 due to a file-reading bug.

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

Download