forhappy / lua-snappy

Lua binding of google's snappy compressor.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lua-snappy

Lua binding of google's snappy compressor.

How to Build

    lua-snappy$ make

That'all, enjoy snappy in lua.

How to Use

Here is a sample usage in shell (lua-snappy_test.lua):

    Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
    > require "snappy"
    > compressed = snappy.compress("hello world!")
    > indicator = snappy.validate_compressed_buffer(compressed)
    > print(indicator)
    true
    > uncompressed = snappy.uncompress(compressed) -- snappy.decompress(compressed) also works.
    > print(uncompressed)
    hello world!

Report Bugs

Please report bugs to haipingf AT gmail DOT com

About

Lua binding of google's snappy compressor.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C++ 76.8%Language:C 20.7%Language:Common Lisp 2.1%Language:Shell 0.3%Language:Lua 0.1%