]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Removing assert for rle that doesn't always hold
authorbimbashrestha <bshrestha.msae@gmail.com>
Mon, 26 Aug 2019 19:26:53 +0000 (12:26 -0700)
committerbimbashrestha <bshrestha.msae@gmail.com>
Mon, 26 Aug 2019 19:26:53 +0000 (12:26 -0700)
lib/compress/zstd_compress.c

index 62261f6f357d3de9f19595bddb14b80929cd2e02..71ede67ce69b6d6d2114cf1b76b78fb38a542325 100644 (file)
@@ -2316,8 +2316,6 @@ out:
         ZSTD_compressedBlockState_t* const tmp = zc->blockState.prevCBlock;
         zc->blockState.prevCBlock = zc->blockState.nextCBlock;
         zc->blockState.nextCBlock = tmp;
-
-        assert(!ZSTD_isRLE(ip, srcSize));
     }
     /* We check that dictionaries have offset codes available for the first
      * block. After the first block, the offcode table might not have large
@@ -2399,6 +2397,7 @@ static size_t ZSTD_compress_frameChunk (ZSTD_CCtx* cctx,
                 const U32 cBlockHeader = cSize == 1 ?
                     lastBlock + (((U32)bt_rle)<<1) + (U32)(blockSize << 3) :
                     lastBlock + (((U32)bt_compressed)<<1) + (U32)(cSize << 3);
+                ZSTD_printBlockStructure(cBlockHeader);
                 MEM_writeLE24(op, cBlockHeader);
                 cSize += ZSTD_blockHeaderSize;
             }