Change `dictionary_compression.c` example to use API for dictionary creation
- 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
Assessment
This issue has not been assessed yet.