Remove extraneous function in this API
This commit is contained in:
parent
f29507c4fc
commit
b8e16a2057
@ -4779,7 +4779,7 @@ static size_t ZSTD_compressSequences_internal(void* dst, size_t dstCapacity,
|
|||||||
return cSize;
|
return cSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t ZSTD_compressSequencesCCtx(ZSTD_CCtx* const cctx, void* dst, size_t dstCapacity,
|
size_t ZSTD_compressSequences(ZSTD_CCtx* const cctx, void* dst, size_t dstCapacity,
|
||||||
const ZSTD_Sequence* inSeqs, size_t inSeqsSize,
|
const ZSTD_Sequence* inSeqs, size_t inSeqsSize,
|
||||||
const void* src, size_t srcSize,
|
const void* src, size_t srcSize,
|
||||||
ZSTD_sequenceFormat_e format) {
|
ZSTD_sequenceFormat_e format) {
|
||||||
@ -4789,7 +4789,7 @@ size_t ZSTD_compressSequencesCCtx(ZSTD_CCtx* const cctx, void* dst, size_t dstCa
|
|||||||
size_t frameHeaderSize = 0;
|
size_t frameHeaderSize = 0;
|
||||||
|
|
||||||
/* Transparent initialization stage, same as compressStream2() */
|
/* Transparent initialization stage, same as compressStream2() */
|
||||||
DEBUGLOG(3, "ZSTD_compressSequencesCCtx()");
|
DEBUGLOG(3, "ZSTD_compressSequences()");
|
||||||
assert(cctx != NULL);
|
assert(cctx != NULL);
|
||||||
FORWARD_IF_ERROR(ZSTD_CCtx_init_compressStream2(cctx, ZSTD_e_end, srcSize), "CCtx initialization failed");
|
FORWARD_IF_ERROR(ZSTD_CCtx_init_compressStream2(cctx, ZSTD_e_end, srcSize), "CCtx initialization failed");
|
||||||
if (dstCapacity < ZSTD_compressBound(srcSize)) {
|
if (dstCapacity < ZSTD_compressBound(srcSize)) {
|
||||||
@ -4827,26 +4827,6 @@ size_t ZSTD_compressSequencesCCtx(ZSTD_CCtx* const cctx, void* dst, size_t dstCa
|
|||||||
return cSize;
|
return cSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
size_t ZSTD_compressSequences(void* dst, size_t dstCapacity,
|
|
||||||
const ZSTD_Sequence* inSeqs, size_t inSeqsSize,
|
|
||||||
const void* src, size_t srcSize, int compressionLevel,
|
|
||||||
ZSTD_sequenceFormat_e format)
|
|
||||||
{
|
|
||||||
size_t cSize;
|
|
||||||
ZSTD_CCtx* const cctx = ZSTD_createCCtx();
|
|
||||||
|
|
||||||
RETURN_ERROR_IF(!cctx, memory_allocation, "Couldn't allocate memory for CCtx!");
|
|
||||||
FORWARD_IF_ERROR(ZSTD_CCtx_reset(cctx, ZSTD_reset_session_and_parameters), "CCtx reset failed");
|
|
||||||
FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, compressionLevel), "Parameter setting failed");
|
|
||||||
|
|
||||||
cSize = ZSTD_compressSequencesCCtx(cctx, dst, dstCapacity, inSeqs, inSeqsSize, src, srcSize, format);
|
|
||||||
FORWARD_IF_ERROR(cSize, "ZSTD_compressSequencesCCtx() failed");
|
|
||||||
|
|
||||||
ZSTD_freeCCtx(cctx);
|
|
||||||
return cSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*====== Finalize ======*/
|
/*====== Finalize ======*/
|
||||||
|
|
||||||
/*! ZSTD_flushStream() :
|
/*! ZSTD_flushStream() :
|
||||||
|
16
lib/zstd.h
16
lib/zstd.h
@ -1328,7 +1328,7 @@ ZSTDLIB_API size_t ZSTD_generateSequences(ZSTD_CCtx* zc, ZSTD_Sequence* outSeqs,
|
|||||||
*/
|
*/
|
||||||
ZSTDLIB_API size_t ZSTD_mergeBlockDelimiters(ZSTD_Sequence* sequences, size_t seqsSize);
|
ZSTDLIB_API size_t ZSTD_mergeBlockDelimiters(ZSTD_Sequence* sequences, size_t seqsSize);
|
||||||
|
|
||||||
/*! ZSTD_compressSequencesCCtx() :
|
/*! ZSTD_compressSequences() :
|
||||||
* Compress sequences given by inSeqs, generated from source buffer 'src', using a cctx.
|
* Compress sequences given by inSeqs, generated from source buffer 'src', using a cctx.
|
||||||
* The entire source is compressed into a single frame.
|
* The entire source is compressed into a single frame.
|
||||||
*
|
*
|
||||||
@ -1341,20 +1341,10 @@ ZSTDLIB_API size_t ZSTD_mergeBlockDelimiters(ZSTD_Sequence* sequences, size_t se
|
|||||||
*
|
*
|
||||||
* @return : final compressed size.
|
* @return : final compressed size.
|
||||||
*/
|
*/
|
||||||
ZSTDLIB_API size_t ZSTD_compressSequencesCCtx(ZSTD_CCtx* const cctx, void* dst, size_t dstSize,
|
ZSTDLIB_API size_t ZSTD_compressSequences(ZSTD_CCtx* const cctx, void* dst, size_t dstSize,
|
||||||
const ZSTD_Sequence* inSeqs, size_t inSeqsSize,
|
const ZSTD_Sequence* inSeqs, size_t inSeqsSize,
|
||||||
const void* src, size_t srcSize,
|
const void* src, size_t srcSize,
|
||||||
ZSTD_sequenceFormat_e format);
|
ZSTD_sequenceFormat_e format);
|
||||||
|
|
||||||
/*! ZSTD_compressSequences() :
|
|
||||||
* Creates a default CCtx based on the given compression level, and invokes ZSTD_compressSequencesCCtx().
|
|
||||||
*
|
|
||||||
* @return : final compressed size.
|
|
||||||
*/
|
|
||||||
ZSTDLIB_API size_t ZSTD_compressSequences(void* dst, size_t dstSize,
|
|
||||||
const ZSTD_Sequence* inSeqs, size_t inSeqsSize,
|
|
||||||
const void* src, size_t srcSize, int compressionLevel,
|
|
||||||
ZSTD_sequenceFormat_e format);
|
|
||||||
|
|
||||||
|
|
||||||
/***************************************
|
/***************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user