mirror of
https://github.com/facebook/zstd.git
synced 2025-12-15 00:04:04 -05:00
coalesce block+header size (buffered mode)
This commit is contained in:
parent
d248aa1c62
commit
944042ab7d
@ -523,7 +523,12 @@ size_t ZBUFF_decompressContinue(ZBUFF_DCtx* zbc, void* dst, size_t* maxDstSizePt
|
||||
*srcSizePtr = ip-istart;
|
||||
*maxDstSizePtr = op-ostart;
|
||||
|
||||
return ZSTD_nextSrcSizeToDecompress(zbc->zc) - zbc->inPos;
|
||||
{
|
||||
size_t nextSrcSizeHint = ZSTD_nextSrcSizeToDecompress(zbc->zc);
|
||||
if (nextSrcSizeHint > 3) nextSrcSizeHint+= 3; /* get the next block header while at it */
|
||||
nextSrcSizeHint -= zbc->inPos; /* already loaded*/
|
||||
return nextSrcSizeHint;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user