Lua binding for BriefLZ compression library
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
script
spec
src
vendor/brieflz
.appveyor.yml
.editorconfig
.envrc
.gitattributes
.gitignore
.travis.yml
CHANGELOG.adoc
LICENSE
README.adoc
Rocksfile
brieflz-dev-0.rockspec
config.ld

README.adoc

BriefLZ for Lua

Build Status Windows Build Status LDoc

This is a Lua binding for BriefLZ – a small and fast open source implementation of a Lempel-Ziv style compression algorithm by Joergen Ibsen.

Installation

You can install BriefLZ using LuaRocks (the Lua package manager):

luarocks install brieflz

or to get the latest development version:

luarocks install --server=http://luarocks.org/dev brieflz

Tip: If you want to bootstrap development environment for running tests, read the next section.

Note

If you have an old gcc version you may encounter error:

vendor/brieflz/src/brieflz.c: In function ‘blz_pack’:
vendor/brieflz/src/brieflz.c:466:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
  for (unsigned long i = 0; i < LOOKUP_SIZE; ++i) {
  ^

In that case you have to explicitly enable C99 mode when installing brieflz:

luarocks install CFLAGS="-std=c99 -Os -fPIC" brieflz

Set up development environment

  1. Clone this repository:

    git clone https://github.com/jirutka/brieflz.lua.git
    cd brieflz.lua
  2. Install Lua and modules for running tests into directory .venv:

    ./script/bootstrap
  3. Start hacking!

  • Build native extension:

    ./script/build
  • Run tests and linter:

    ./script/test

License

This project is licensed under zlib License. For the full text of the license, see the LICENSE file.