lua-ezlib provides the following API:
Deflates str
using the format fmt
(a string) that can be one of the following:
zlib
: zlib format (default);gzip
: gzip format;raw
: raw deflate;
Optional compression level lvl
must be between 0 and 9 (the default is 6).
Inflates str
using the format fmt
(a string) that can be one of the following:
zlib
: zlib format (default);gzip
: gzip format;raw
: raw inflate;auto
: zlib or gzip format;
Returns the type of compressed data in str
. Possible values are 'zlib'
, 'gzip'
or nil
.
Returns a CRC-32 checksum for str
.
Returns an Adler-32 checksum for str
.
To build and install, run:
luarocks make
luarocks test
To install the latest release using luarocks.org, run:
luarocks install lua-ezlib