Include block checksum in worst case scenario calculation of dstCapacity
This commit is contained in:
parent
8453e071f1
commit
9e056bc032
@ -327,6 +327,7 @@ static size_t LZ4F_compressBound_internal(size_t srcSize,
|
||||
{
|
||||
LZ4F_preferences_t prefsNull = LZ4F_INIT_PREFERENCES;
|
||||
prefsNull.frameInfo.contentChecksumFlag = LZ4F_contentChecksumEnabled; /* worst case */
|
||||
prefsNull.frameInfo.blockChecksumFlag = LZ4F_blockChecksumEnabled; /* worst case */
|
||||
{ const LZ4F_preferences_t* const prefsPtr = (preferencesPtr==NULL) ? &prefsNull : preferencesPtr;
|
||||
U32 const flush = prefsPtr->autoFlush | (srcSize==0);
|
||||
LZ4F_blockSizeID_t const blockID = prefsPtr->frameInfo.blockSizeID;
|
||||
|
Loading…
Reference in New Issue
Block a user