needs further investigation.
*/
const U32 rleMaxLength = 25;
+ /*
+ We don't want to emit our first block as a RLE even if it qualifies because
+ doing so will cause the decoder to throw a "should consume all input error."
+ https://github.com/facebook/zstd/blob/dev/programs/fileio.c#L1723
+ */
+ U32 isFirstBlock = zc->inBuffPos == srcSize;
size_t cSize;
const BYTE* ip = (const BYTE*)src;
BYTE* op = (BYTE*)dst;
zc->entropyWorkspace, HUF_WORKSPACE_SIZE /* statically allocated in resetCCtx */,
zc->bmi2);
- /*
- We don't want to emit our first block as a RLE even if it qualifies because
- doing so will cause the decoder to throw a "should consume all input error."
- https://github.com/facebook/zstd/blob/dev/programs/fileio.c#L1723
- */
- U32 isFirstBlock = zc->inBuffPos == srcSize;
-
if (frame &&
!isFirstBlock &&
cSize < rleMaxLength &&