All Projects → sjnam → luajit-zstd

sjnam / luajit-zstd

Licence: other
Facebook zstandard ffi binding

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to luajit-zstd

ratarmount
Random Access Read-Only Tar Mount
Stars: ✭ 217 (+886.36%)
Mutual labels:  zstandard
box
Box - Open Standard Archive Format, a zip killer.
Stars: ✭ 38 (+72.73%)
Mutual labels:  zstandard
zstdmt
Multithreading Library for Brotli, Lizard, LZ4, LZ5, Snappy and Zstandard
Stars: ✭ 107 (+386.36%)
Mutual labels:  zstandard
pyzstd
Python bindings to Zstandard (zstd) compression library, the API is similar to Python's bz2/lzma/zlib modules.
Stars: ✭ 4 (-81.82%)
Mutual labels:  zstandard
ZstdKit
An Objective-C and Swift library for Zstd (Zstandard) compression and decompression.
Stars: ✭ 22 (+0%)
Mutual labels:  zstandard
sparkzstd
A zstd decompressor written in golang
Stars: ✭ 45 (+104.55%)
Mutual labels:  zstandard
ZRA
ZStandard Random Access (ZRA) allows random access inside an archive compressed using ZStandard
Stars: ✭ 21 (-4.55%)
Mutual labels:  zstandard
pgzstd
Postgres module for Zstandard compression/decompression with preset dictionary support
Stars: ✭ 31 (+40.91%)
Mutual labels:  zstandard
Compress
Optimized Go Compression Packages
Stars: ✭ 2,478 (+11163.64%)
Mutual labels:  zstandard
7 Zip Zstd
7-Zip with support for Brotli, Fast-LZMA2, Lizard, LZ4, LZ5 and Zstandard
Stars: ✭ 2,150 (+9672.73%)
Mutual labels:  zstandard
Archiver
Easily create & extract archives, and compress & decompress files of various formats
Stars: ✭ 3,373 (+15231.82%)
Mutual labels:  zstandard
EasyCompressor
⚡ A compression library that implements many compression algorithms such as LZ4, Zstd, LZMA, Snappy, Brotli, GZip, and Deflate. It helps you to improve performance by reducing Memory Usage and Network Traffic for caching.
Stars: ✭ 167 (+659.09%)
Mutual labels:  zstandard
sqlite zstd vfs
SQLite3 extension for read/write storage compression with Zstandard
Stars: ✭ 42 (+90.91%)
Mutual labels:  zstandard

Name

luajit-zstd - facebook zstandard ffi binding

Installation

To install luajit-zstd you need to install Zstandard with shared libraries firtst. Then you can install luajit-zstd by placing lib/zstd.lua to your lua library path.

Example

local zstandard = require "zstd"
local zstd = zstandard:new()
local txt = string.rep("ABCD", 1000)
print("Uncompressed size:", #txt)
local c, err = zstd:compress(txt)
print("Compressed size:", #c)
local txt2, err = zstd:decompress(c)
assert(txt == txt2)
zstd:free()

Methods

new

syntax: zstd = zstandard:new()

Create cstream and dstream.

free

syntax: zstd:free()

Free cstream and dstream.

compress

syntax: encoded_buffer, err = zstd:compress(input_buffer, clvl)

Compresses the data in input_buffer into encoded_buffer.

decompress

syntax: decoded_buffer, err = zstd:decompress(encoded_buffer)

Decompresses the data in encoded_buffer into decoded_buffer.

compressFile

syntax: ok, err = zstd:compressFile(path, clvl?)

Compresses the input file with clvl compression level.

decompressFile

syntax: ok, err = zstd:decompressFile(fname, outname?)

Decompress the input file fname.

compressFileUsingDictionary

syntax: ok, err = zstd:compressFileUsingDictionary(path, dict, clvl?)

Compresses the input file with clvl compression level using a digested Dictionary.

decompressFileUsingDictionary

syntax: ok, err = zstd:decompressFileUsingDictionary(fname, dict, outname?)

Decompress the input file fname using a digested Dictionary.

Author

Soojin Nam [email protected]

License

Public Domain

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].