diff options
author | ShadowNinja <shadowninja@minetest.net> | 2014-09-14 17:42:08 -0400 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2014-09-20 14:02:54 -0400 |
commit | 406ed5efac68af31c3cc7a0e7401ebf4dd419804 (patch) | |
tree | 377b40c24e5bcd73a773018e10636172c808276e /doc | |
parent | d6e28c19b59e336f4581682baacb6afb66956f95 (diff) | |
download | minetest-406ed5efac68af31c3cc7a0e7401ebf4dd419804.tar.gz minetest-406ed5efac68af31c3cc7a0e7401ebf4dd419804.tar.bz2 minetest-406ed5efac68af31c3cc7a0e7401ebf4dd419804.zip |
Add compression API
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 37477b60a..805b63f6a 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1763,6 +1763,18 @@ minetest.deserialize(string) -> table ^ Example: deserialize('return { ["foo"] = "bar" }') -> {foo='bar'} ^ Example: deserialize('print("foo")') -> nil (function call fails) ^ error:[string "print("foo")"]:1: attempt to call global 'print' (a nil value) +minetest.compress(data, method, ...) -> compressed_data +^ Compress a string of data. +^ `method` is a string identifying the compression method to be used. +^ Supported compression methods: +^ Deflate (zlib): "deflate" +^ `...` indicates method-specific arguments. Currently defined arguments are: +^ Deflate: `level` - Compression level, 0-9 or nil. +minetest.decompress(compressed_data, method, ...) -> data +^ Decompress a string of data (using ZLib). +^ See documentation on minetest.compress() for supported compression methods. +^ currently supported. +^ `...` indicates method-specific arguments. Currently, no methods use this. minetest.is_protected(pos, name) -> bool ^ This function should be overridden by protection mods and should be used to check if a player can interact at a position. |