facebook / facebook/zstd

Change `dictionary_compression.c` example to use API for dictionary creation

Open
#4,066 0 comments 3 reactions 0 assignees View on GitHub
feature request
Dominant language
C
Stars
27.9k
Forks
2.6k
Avg merge
1d 3h
Merged PRs (30d)
8

Description

**Is your feature request related to a problem? Please describe.**
The current example in [`examples/dictionary_compression.c`](https://github.com/facebook/zstd/blob/dev/examples/dictionary_compression.c) assumes that the user has already created the dictionary via the CLI. I checked this example specifically to figure out how to do dictionary compression from end-to-end with the API, so in my case this fails as an example considering it's missing the most important step in the process.

**Describe the solution you'd like**
Adding a function to demonstrate the usage of the API for dictionary creation would make the example infinitely more useful.

**Describe alternatives you've considered**
I suppose that an entirely new example, something like `dictionary_creation.c`, would also solve this issue.

**Additional context**
n/a

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.