Removed ZBUFF internal util function from public area
This commit is contained in:
parent
5347aee8f7
commit
ac110a1f21
@ -163,19 +163,10 @@ ZSTDLIB_API size_t ZBUFF_recommendedDOutSize(void);
|
|||||||
#ifdef ZBUFF_STATIC_LINKING_ONLY
|
#ifdef ZBUFF_STATIC_LINKING_ONLY
|
||||||
|
|
||||||
/* *************************************
|
/* *************************************
|
||||||
* Includes
|
* Dependency
|
||||||
***************************************/
|
***************************************/
|
||||||
#include "zstd_static.h" /* ZSTD_parameters */
|
#include "zstd_static.h" /* ZSTD_parameters */
|
||||||
|
|
||||||
/* internal util function */
|
|
||||||
#define ZBUFF_MIN(a,b) ((a)<(b) ? (a) : (b))
|
|
||||||
MEM_STATIC size_t ZBUFF_limitCopy(void* dst, size_t dstCapacity, const void* src, size_t srcSize)
|
|
||||||
{
|
|
||||||
size_t length = ZBUFF_MIN(dstCapacity, srcSize);
|
|
||||||
memcpy(dst, src, length);
|
|
||||||
return length;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*-*************************************
|
/*-*************************************
|
||||||
* Advanced functions
|
* Advanced functions
|
||||||
|
@ -183,6 +183,15 @@ size_t ZBUFF_compressInit(ZBUFF_CCtx* zbc, int compressionLevel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* internal util function */
|
||||||
|
MEM_STATIC size_t ZBUFF_limitCopy(void* dst, size_t dstCapacity, const void* src, size_t srcSize)
|
||||||
|
{
|
||||||
|
size_t const length = MIN(dstCapacity, srcSize);
|
||||||
|
memcpy(dst, src, length);
|
||||||
|
return length;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* *** Compression *** */
|
/* *** Compression *** */
|
||||||
|
|
||||||
static size_t ZBUFF_compressContinue_generic(ZBUFF_CCtx* zbc,
|
static size_t ZBUFF_compressContinue_generic(ZBUFF_CCtx* zbc,
|
||||||
|
@ -138,6 +138,15 @@ size_t ZBUFF_decompressInit(ZBUFF_DCtx* zbd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* internal util function */
|
||||||
|
MEM_STATIC size_t ZBUFF_limitCopy(void* dst, size_t dstCapacity, const void* src, size_t srcSize)
|
||||||
|
{
|
||||||
|
size_t const length = MIN(dstCapacity, srcSize);
|
||||||
|
memcpy(dst, src, length);
|
||||||
|
return length;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* *** Decompression *** */
|
/* *** Decompression *** */
|
||||||
|
|
||||||
size_t ZBUFF_decompressContinue(ZBUFF_DCtx* zbd,
|
size_t ZBUFF_decompressContinue(ZBUFF_DCtx* zbd,
|
||||||
|
Loading…
Reference in New Issue
Block a user