Skip to content

silviucpp/ezstd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a4b5a98 · Mar 4, 2025

History

76 Commits
May 18, 2024
Feb 20, 2025
Mar 4, 2025
May 18, 2024
May 18, 2022
Feb 22, 2025
Nov 20, 2019
Feb 20, 2025
Feb 22, 2025
Feb 20, 2025
Feb 20, 2025
May 18, 2022
Nov 20, 2019

Repository files navigation

ezstd

Build Status GitHub Hex.pm

Zstd binding for Erlang

This binding is based on zstd v1.5.6. 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