lights FAQ Forum github.com/luapower/lz4
lz4

Compression
zlib
lz4 WIP

lz4

extremely fast compression


local lz4 = require'lz4'

API

buffer API
lz4.compress(src, [#src], dst, [#dst], [accel], [level], [state], [filldest]) -> #dst
lz4.decompress(src, [#src] | true, dst, [#dst], [outlen]) -> #dst
stream API
lz4.compress_stream([hc]) -> cs
lz4.decompress_stream() -> ds
cs:compress(src, [#src], dst, [#dst], [accel/level]) -> #dst
`ds:decompress(src, [#src] | true, dst, [#dst])
dictionaries
cs:load_dict(dict, [#dict])
cs:save_dict(dict, #dict)
ds:set_dict(dict, [#dict])
cs|ds:free()
cs|ds:reset()
misc
lz4.sizeof_state() -> bytes
lz4.sizeof_state_hc() -> bytes
lz4.compress_bound() -> bytes
lz4.version() -> n

Last updated: 2 years ago | Edit on GitHub

Pkg type:Lua+ffi
Version: dev-0-gdfaea65
Last commit:
License: PD
Import ver: r131
Requires: +luajit 
Required by: none

Top