Single-file decoder script can now (optionally) create an encoder
To complement the single-file decoder a new script was added to create an amalgamated single-file of all of the Zstd source, along with examples and (simple) tests.
This commit is contained in:
@@ -3749,13 +3749,16 @@ static size_t ZSTD_nextInputSizeHint(const ZSTD_CCtx* cctx)
|
||||
return hintInSize;
|
||||
}
|
||||
|
||||
static size_t ZSTD_limitCopy(void* dst, size_t dstCapacity,
|
||||
const void* src, size_t srcSize)
|
||||
#ifndef ZSTD_DECOMPRESS_INTERNAL_H /* zstd_decompress.c has the same function */
|
||||
MEM_STATIC size_t ZSTD_limitCopy(void* dst, size_t dstCapacity, const void* src, size_t srcSize)
|
||||
{
|
||||
size_t const length = MIN(dstCapacity, srcSize);
|
||||
if (length) memcpy(dst, src, length);
|
||||
if (length > 0) {
|
||||
memcpy(dst, src, length);
|
||||
}
|
||||
return length;
|
||||
}
|
||||
#endif
|
||||
|
||||
/** ZSTD_compressStream_generic():
|
||||
* internal function for all *compressStream*() variants
|
||||
|
||||
Reference in New Issue
Block a user