From: W. Felix Handte
size_t ZSTD_CStreamOutSize(void); /**< recommended size for output buffer. Guarantee to successfully flush at least one complete compressed block in all circumstances. */
-This is a legacy streaming API, and can be replaced by ZSTD_CCtx_reset() and
ZSTD_compressStream2(). It is redundent, but is still fully supported.
+
This is a legacy streaming API, and can be replaced by ZSTD_CCtx_reset() and
ZSTD_compressStream2(). It is redundant, but is still fully supported.
Advanced parameters and dictionary compression can only be used through the
new API.
@@ -647,9 +647,7 @@ size_t ZSTD_freeCStream(ZSTD_CStream* zcs);
ZSTD_DStream management functions
ZSTD_DStream* ZSTD_createDStream(void);
size_t ZSTD_freeDStream(ZSTD_DStream* zds);
-Streaming decompression functions
size_t ZSTD_initDStream(ZSTD_DStream* zds);
-size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inBuffer* input);
-
+Streaming decompression functions
size_t ZSTD_DStreamInSize(void); /*!< recommended size for input buffer */
size_t ZSTD_DStreamOutSize(void); /*!< recommended size for output buffer. Guarantee to successfully flush at least one complete block in all circumstances. */
@@ -1407,9 +1405,32 @@ size_t ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs, const ZSTD_CDict*
size_t ZSTD_initDStream_usingDict(ZSTD_DStream* zds, const void* dict, size_t dictSize);/**< note: no dictionary will be used if dict == NULL or dictSize < 8 */ -size_t ZSTD_initDStream_usingDDict(ZSTD_DStream* zds, const ZSTD_DDict* ddict); /**< note : ddict is referenced, it must outlive decompression session */ -size_t ZSTD_resetDStream(ZSTD_DStream* zds); /**< re-use decompression parameters from previous init; saves dictionary loading */ +
This is an advanced API, giving full control over buffer management, for users which need direct control over memory.