Module gz

gz.lua is a very basic ffi binding to the functions gzopen, gzwrite and gzclose of zlib.

Local Functions

gzopen (fname, mode) Wrapper around gzopen
gzwrite (gzf, str) Wrapper around gzwrite
gzclose (gzf) Wrapper around gzclose.


Local Functions

gzopen (fname, mode)
Wrapper around gzopen

Parameters:

  • fname string containing filename
  • mode string defining the open mode (read: "r", write: "w", binary: "b") Default: "wb"

Returns:

    a gzf object with write and close methods.
gzwrite (gzf, str)
Wrapper around gzwrite

Parameters:

  • gzf a gzf object (the result of gzopen)
  • str a string to compress and write to gzf

Returns:

    the number of processed bytes (useful for assertions)
gzclose (gzf)
Wrapper around gzclose.

Parameters:

  • gzf a gzf object (the result of gzopen)
generated by LDoc 1.4.3 Last updated 2016-03-11 15:53:17