Problem is more complex. When receive incomplete frame, decompression context need to be reset with LZ4F_resetDecompressionContext (added in lz4 1.8.0).
I add simple port
void LZ4F_resetDecompressionContext(LZ4F_dctx* dctx) { dctx->dStage = dstage_getHeader; dctx->dict = NULL; dctx->dictSize = 0; }
And with first patch problem was solved.
Problem is more complex. When receive incomplete frame, decompression context need to be reset with LZ4F_resetDecom pressionContext (added in lz4 1.8.0).
I add simple port
void LZ4F_resetDecom pressionContext (LZ4F_dctx* dctx)
{
dctx->dStage = dstage_getHeader;
dctx->dict = NULL;
dctx->dictSize = 0;
}
And with first patch problem was solved.