mirror of
https://github.com/facebook/zstd.git
synced 2025-08-05 19:15:58 +03:00
made ZSTD_compress_generic() definition accessible
note that the implementation is not done yet.
This commit is contained in:
@@ -574,13 +574,13 @@ size_t ZSTD_estimateDDictSize(size_t dictSize);
|
|||||||
size_t ZSTD_CDict_setParameter(ZSTD_CDict* cdict, ZSTD_cParameter param, unsigned value); </b>/* Not ready yet ! */<b>
|
size_t ZSTD_CDict_setParameter(ZSTD_CDict* cdict, ZSTD_cParameter param, unsigned value); </b>/* Not ready yet ! */<b>
|
||||||
size_t ZSTD_CDict_loadDictionary(ZSTD_CDict* cdict, const void* dict, size_t dictSize); </b>/* Not ready yet ! */<b>
|
size_t ZSTD_CDict_loadDictionary(ZSTD_CDict* cdict, const void* dict, size_t dictSize); </b>/* Not ready yet ! */<b>
|
||||||
</b><p> Create a CDict object which is still mutable after creation.
|
</b><p> Create a CDict object which is still mutable after creation.
|
||||||
It allows usage of ZSTD_CDict_setParameter().
|
It's the only one case allowing usage of ZSTD_CDict_setParameter().
|
||||||
Once all compression parameters are selected,
|
Once all compression parameters are selected,
|
||||||
it's possible to load the target dictionary, using ZSTD_CDict_loadDictionary().
|
it's possible to load the target dictionary, using ZSTD_CDict_loadDictionary().
|
||||||
Dictionary content will be copied internally, except if ZSTD_p_refDictContent is used.
|
Dictionary content will be copied internally (except if ZSTD_p_refDictContent is set).
|
||||||
After loading the dictionary, no more change is possible.
|
After loading the dictionary, no more change is possible.
|
||||||
The only remaining operation is to free CDict object.
|
The only remaining operation is to free CDict object.
|
||||||
Note : An unfinished CDict behaves the same as a NULL CDict when referenced into a CCtx.
|
Note : An unfinished CDict behaves the same as a NULL CDict if referenced into a CCtx.
|
||||||
|
|
||||||
</p></pre><BR>
|
</p></pre><BR>
|
||||||
|
|
||||||
|
@@ -2468,14 +2468,14 @@ static size_t ZSTD_compressBlock_internal(ZSTD_CCtx* zc, void* dst, size_t dstCa
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*! ZSTD_compress_generic() :
|
/*! ZSTD_compress_frameChunk() :
|
||||||
* Compress a chunk of data into one or multiple blocks.
|
* Compress a chunk of data into one or multiple blocks.
|
||||||
* All blocks will be terminated, all input will be consumed.
|
* All blocks will be terminated, all input will be consumed.
|
||||||
* Function will issue an error if there is not enough `dstCapacity` to hold the compressed content.
|
* Function will issue an error if there is not enough `dstCapacity` to hold the compressed content.
|
||||||
* Frame is supposed already started (header already produced)
|
* Frame is supposed already started (header already produced)
|
||||||
* @return : compressed size, or an error code
|
* @return : compressed size, or an error code
|
||||||
*/
|
*/
|
||||||
static size_t ZSTD_compress_generic (ZSTD_CCtx* cctx,
|
static size_t ZSTD_compress_frameChunk (ZSTD_CCtx* cctx,
|
||||||
void* dst, size_t dstCapacity,
|
void* dst, size_t dstCapacity,
|
||||||
const void* src, size_t srcSize,
|
const void* src, size_t srcSize,
|
||||||
U32 lastFrameChunk)
|
U32 lastFrameChunk)
|
||||||
@@ -2630,7 +2630,7 @@ static size_t ZSTD_compressContinue_internal (ZSTD_CCtx* cctx,
|
|||||||
|
|
||||||
if (srcSize) {
|
if (srcSize) {
|
||||||
size_t const cSize = frame ?
|
size_t const cSize = frame ?
|
||||||
ZSTD_compress_generic (cctx, dst, dstCapacity, src, srcSize, lastFrameChunk) :
|
ZSTD_compress_frameChunk (cctx, dst, dstCapacity, src, srcSize, lastFrameChunk) :
|
||||||
ZSTD_compressBlock_internal (cctx, dst, dstCapacity, src, srcSize);
|
ZSTD_compressBlock_internal (cctx, dst, dstCapacity, src, srcSize);
|
||||||
if (ZSTD_isError(cSize)) return cSize;
|
if (ZSTD_isError(cSize)) return cSize;
|
||||||
cctx->consumedSrcSize += srcSize;
|
cctx->consumedSrcSize += srcSize;
|
||||||
|
@@ -688,13 +688,13 @@ ZSTDLIB_API size_t ZSTD_CCtx_refPrefix(ZSTD_CCtx* cctx, const void* prefix, size
|
|||||||
|
|
||||||
/*! ZSTD_CDict_createEmpty() :
|
/*! ZSTD_CDict_createEmpty() :
|
||||||
* Create a CDict object which is still mutable after creation.
|
* Create a CDict object which is still mutable after creation.
|
||||||
* It allows usage of ZSTD_CDict_setParameter().
|
* It's the only one case allowing usage of ZSTD_CDict_setParameter().
|
||||||
* Once all compression parameters are selected,
|
* Once all compression parameters are selected,
|
||||||
* it's possible to load the target dictionary, using ZSTD_CDict_loadDictionary().
|
* it's possible to load the target dictionary, using ZSTD_CDict_loadDictionary().
|
||||||
* Dictionary content will be copied internally, except if ZSTD_p_refDictContent is used.
|
* Dictionary content will be copied internally (except if ZSTD_p_refDictContent is set).
|
||||||
* After loading the dictionary, no more change is possible.
|
* After loading the dictionary, no more change is possible.
|
||||||
* The only remaining operation is to free CDict object.
|
* The only remaining operation is to free CDict object.
|
||||||
* Note : An unfinished CDict behaves the same as a NULL CDict when referenced into a CCtx.
|
* Note : An unfinished CDict behaves the same as a NULL CDict if referenced into a CCtx.
|
||||||
*/
|
*/
|
||||||
ZSTDLIB_API ZSTD_CDict* ZSTD_CDict_createEmpty(void); /* Not ready yet ! */
|
ZSTDLIB_API ZSTD_CDict* ZSTD_CDict_createEmpty(void); /* Not ready yet ! */
|
||||||
ZSTDLIB_API size_t ZSTD_CDict_setParameter(ZSTD_CDict* cdict, ZSTD_cParameter param, unsigned value); /* Not ready yet ! */
|
ZSTDLIB_API size_t ZSTD_CDict_setParameter(ZSTD_CDict* cdict, ZSTD_cParameter param, unsigned value); /* Not ready yet ! */
|
||||||
@@ -714,7 +714,6 @@ ZSTDLIB_API size_t ZSTD_CDict_loadDictionary(ZSTD_CDict* cdict, const void* dict
|
|||||||
ZSTDLIB_API size_t ZSTD_CCtx_refCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict); /* Not ready yet ! */
|
ZSTDLIB_API size_t ZSTD_CCtx_refCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict); /* Not ready yet ! */
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
// Target advanced compression API
|
// Target advanced compression API
|
||||||
// Not ready yet !!!
|
// Not ready yet !!!
|
||||||
|
|
||||||
@@ -749,9 +748,9 @@ ZSTDLIB_API size_t ZSTD_compress_generic (ZSTD_CCtx* cctx,
|
|||||||
* It's allowed to change compression parameters after a reset.
|
* It's allowed to change compression parameters after a reset.
|
||||||
* Any internal data not yet flushed is cancelled.
|
* Any internal data not yet flushed is cancelled.
|
||||||
*/
|
*/
|
||||||
|
// Not ready yet !!!
|
||||||
ZSTDLIB_API size_t ZSTD_CCtx_reset(ZSTD_CCtx* cctx);
|
ZSTDLIB_API size_t ZSTD_CCtx_reset(ZSTD_CCtx* cctx);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*--- Advanced decompression functions ---*/
|
/*--- Advanced decompression functions ---*/
|
||||||
|
Reference in New Issue
Block a user