Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/silviucpp/ezstd
Zstd binding for Erlang
https://github.com/silviucpp/ezstd
erlang zstd
Last synced: 4 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 (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-18T16:44:05.000Z (8 months ago)
- Last Synced: 2025-01-15T15:26:46.062Z (11 days ago)
- Topics: erlang, zstd
- Language: Erlang
- Homepage:
- Size: 74.2 KB
- Stars: 57
- Watchers: 4
- Forks: 20
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ezstd
[![Build Status](https://app.travis-ci.com/silviucpp/ezstd.svg?branch=master)](https://travis-ci.com/github/silviucpp/ezstd)
[![GitHub](https://img.shields.io/github/license/silviucpp/ezstd)](https://github.com/silviucpp/ezstd/blob/master/LICENSE)
[![Hex.pm](https://img.shields.io/hexpm/v/ezstd)](https://hex.pm/packages/ezstd)## [Zstd][1] 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
```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/