zstd/examples/README.md

47 lines
1.8 KiB
Markdown
Raw Permalink Normal View History

Zstandard library : usage examples
==================================
2016-09-08 10:48:04 -07:00
- [Simple compression](simple_compression.c) :
2016-07-09 09:25:10 -07:00
Compress a single file.
Introduces usage of : `ZSTD_compress()`
2016-09-08 10:48:04 -07:00
- [Simple decompression](simple_decompression.c) :
Decompress a single file.
2016-09-08 10:39:00 -07:00
Only compatible with simple compression.
Result remains in memory.
2016-07-09 09:25:10 -07:00
Introduces usage of : `ZSTD_decompress()`
- [Multiple simple compression](multiple_simple_compression.c) :
Compress multiple files (in simple mode) in a single command line.
Demonstrates memory preservation technique that
minimizes malloc()/free() calls by re-using existing resources.
Introduces usage of : `ZSTD_compressCCtx()`
2017-09-18 15:49:59 -07:00
- [Streaming memory usage](streaming_memory_usage.c) :
Provides amount of memory used by streaming context.
2017-09-18 15:49:59 -07:00
Introduces usage of : `ZSTD_sizeof_CStream()`
2016-09-08 10:48:04 -07:00
- [Streaming compression](streaming_compression.c) :
2016-09-08 10:39:00 -07:00
Compress a single file.
Introduces usage of : `ZSTD_compressStream()`
- [Multiple Streaming compression](multiple_streaming_compression.c) :
Compress multiple files (in streaming mode) in a single command line.
Introduces memory usage preservation technique,
reducing impact of malloc()/free() and memset() by re-using existing resources.
2016-09-08 10:48:04 -07:00
- [Streaming decompression](streaming_decompression.c) :
2016-09-08 10:39:00 -07:00
Decompress a single file compressed by zstd.
2016-09-08 10:48:04 -07:00
Compatible with both simple and streaming compression.
2016-09-08 10:39:00 -07:00
Result is sent to stdout.
Introduces usage of : `ZSTD_decompressStream()`
2016-09-08 10:48:04 -07:00
- [Dictionary compression](dictionary_compression.c) :
Compress multiple files using the same dictionary.
Introduces usage of : `ZSTD_createCDict()` and `ZSTD_compress_usingCDict()`
- [Dictionary decompression](dictionary_decompression.c) :
Decompress multiple files using the same dictionary.
Result remains in memory.
Introduces usage of : `ZSTD_createDDict()` and `ZSTD_decompress_usingDDict()`