Merge pull request #1773 from bimbashrestha/rle_first_block_decompression_fix

Removing redundant condition in decompression, making first block rle…
This commit is contained in:
Yann Collet
2019-09-10 11:17:29 -07:00
committed by GitHub
5 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -2333,8 +2333,8 @@ static size_t ZSTD_compressBlock_internal(ZSTD_CCtx* zc,
if (frame &&
/* 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
* doing so will cause the decoder (cli only) to throw a "should consume all input error."
* This is only an issue for zstd <= v1.4.3
*/
!zc->isFirstBlock &&
cSize < rleMaxLength &&