https://github.com/silviucpp/ezstd
Zstd binding for Erlang
https://github.com/silviucpp/ezstd
erlang zstd
Last synced: 17 days ago
JSON representation
Zstd binding for Erlang
- Host: GitHub
- URL: https://github.com/silviucpp/ezstd
- Owner: silviucpp
- License: mit
- Created: 2019-11-20T12:33:22.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-04T15:10:05.000Z (about 2 months ago)
- Last Synced: 2025-04-03T16:12:33.048Z (26 days ago)
- Topics: erlang, zstd
- Language: Erlang
- Homepage:
- Size: 60.5 KB
- Stars: 59
- Watchers: 3
- Forks: 21
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ezstd
[](https://travis-ci.com/github/silviucpp/ezstd)
[](https://github.com/silviucpp/ezstd/blob/master/LICENSE)
[](https://hex.pm/packages/ezstd)## [Zstd][1] 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
```erl
Plaintext = <<"contentcontentcontentcontent">>,
Compressed = ezstd:compress(Plaintext, 1),
Plaintext = ezstd:decompress(Compressed).
```### Compress and decompress using dictionary
```erl
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
```sh
rebar3 ct
```[1]:http://facebook.github.io/zstd/