zstdmt : changed internal naming from frame to chunk

Since the result of mt compression is a single frame,
changed naming, which implied the concatenation of multiple frames.

minor : ensures that content size is written in header
This commit is contained in:
Yann Collet
2017-01-12 01:25:46 +01:00
parent 5eb749e734
commit 107bcbbbc2
2 changed files with 191 additions and 86 deletions
+14 -2
View File
@@ -1,12 +1,24 @@
/* === Dependencies === */
#include <stddef.h> /* size_t */
#include "zstd.h" /* ZSTD_inBuffer, ZSTD_outBuffer */
/* === Simple one-pass functions === */
typedef struct ZSTDMT_CCtx_s ZSTDMT_CCtx;
ZSTDMT_CCtx *ZSTDMT_createCCtx(unsigned nbThreads);
ZSTDMT_CCtx* ZSTDMT_createCCtx(unsigned nbThreads);
size_t ZSTDMT_freeCCtx(ZSTDMT_CCtx* cctx);
size_t ZSTDMT_compressCCtx(ZSTDMT_CCtx* cctx,
void* dst, size_t dstCapacity,
const void* src, size_t srcSize,
int compressionLevel);
/* === Streaming functions === */
size_t ZSTDMT_initCStream(ZSTDMT_CCtx* zcs, int compressionLevel);
size_t ZSTDMT_compressStream(ZSTDMT_CCtx* zcs, ZSTD_outBuffer* output, ZSTD_inBuffer* input);
size_t ZSTDMT_flushStream(ZSTDMT_CCtx* zcs, ZSTD_outBuffer* output);
size_t ZSTDMT_endStream(ZSTDMT_CCtx* zcs, ZSTD_outBuffer* output);