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 authored and GitHub committed 2019-09-10 11:17:29 -07:00
commit 41416f0927
5 files changed
+9 -9

No files matched your search

+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 &&