| Yann Collet | 3d93f2f | 2016-12-27 07:19:36 +0100 | [diff] [blame] | 1 | |
| Yann Collet | 107bcbb | 2017-01-12 01:25:46 +0100 | [diff] [blame^] | 2 | /* === Dependencies === */ |
| Yann Collet | 3d93f2f | 2016-12-27 07:19:36 +0100 | [diff] [blame] | 3 | #include <stddef.h> /* size_t */ |
| Yann Collet | 107bcbb | 2017-01-12 01:25:46 +0100 | [diff] [blame^] | 4 | #include "zstd.h" /* ZSTD_inBuffer, ZSTD_outBuffer */ |
| 5 | |
| 6 | |
| 7 | /* === Simple one-pass functions === */ |
| Yann Collet | 3d93f2f | 2016-12-27 07:19:36 +0100 | [diff] [blame] | 8 | |
| 9 | typedef struct ZSTDMT_CCtx_s ZSTDMT_CCtx; |
| Yann Collet | 107bcbb | 2017-01-12 01:25:46 +0100 | [diff] [blame^] | 10 | ZSTDMT_CCtx* ZSTDMT_createCCtx(unsigned nbThreads); |
| Yann Collet | 3d93f2f | 2016-12-27 07:19:36 +0100 | [diff] [blame] | 11 | size_t ZSTDMT_freeCCtx(ZSTDMT_CCtx* cctx); |
| 12 | |
| 13 | size_t ZSTDMT_compressCCtx(ZSTDMT_CCtx* cctx, |
| 14 | void* dst, size_t dstCapacity, |
| 15 | const void* src, size_t srcSize, |
| 16 | int compressionLevel); |
| Yann Collet | 107bcbb | 2017-01-12 01:25:46 +0100 | [diff] [blame^] | 17 | |
| 18 | |
| 19 | /* === Streaming functions === */ |
| 20 | |
| 21 | size_t ZSTDMT_initCStream(ZSTDMT_CCtx* zcs, int compressionLevel); |
| 22 | size_t ZSTDMT_compressStream(ZSTDMT_CCtx* zcs, ZSTD_outBuffer* output, ZSTD_inBuffer* input); |
| 23 | size_t ZSTDMT_flushStream(ZSTDMT_CCtx* zcs, ZSTD_outBuffer* output); |
| 24 | size_t ZSTDMT_endStream(ZSTDMT_CCtx* zcs, ZSTD_outBuffer* output); |