Lua library module "gz"

Author: Hans van der Meer

The Lua module gz is a C-module for the compression of data with the C-library zlib.



  1. The calling sequences below assume the module has the name gz assigned to it from the require.
  2. Calling compress functions is in object notation with g as the variable name.


gz.compress(string, level) return compressed, compression level 0-9 = fast-best
gz.compress(string) use default compression
gz.compressbest(string) use best compression
gz.compressfast(string) use fastest compression


g:decompress() return expanded data as string

Query state

gz.version() return version of module