tellerhq / ezstd

Zstd binding for Erlang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ezstd

Build Status GitHub Hex.pm

Zstd binding for Erlang

This binding is based on zstd v1.5.5. In case you want to modify the zstd version you can change ZSTD_TAG from build_deps.sh

API

Compress and decompress

Plaintext = <<"contentcontentcontentcontent">>,
Compressed = ezstd:compress(Plaintext, 1),
Plaintext = ezstd:decompress(Compressed).

Compress and decompress using dictionary

Dict = <<"content-dict">>,
CDict = ezstd:create_cdict(Dict, 1),
DDict = ezstd:create_ddict(Dict),
Plaintext = <<"contentcontentcontentcontent">>,
ContentCompressed = ezstd:compress_using_cdict(Plaintext, CDict),
Plaintext = ezstd:decompress_using_ddict(ContentCompressed, DDict).

Running tests

rebar3 ct

About

Zstd binding for Erlang

License:MIT License


Languages

Language:Erlang 74.8%Language:Makefile 16.1%Language:Shell 6.2%Language:C 3.0%