[cover] Add dictionary size to compressed size

This commit is contained in:
Nick Terrell 2017-08-21 14:23:17 -07:00
parent 9a54a315aa
commit 98de3f6847

View File

@ -888,7 +888,7 @@ static void COVER_tryParameters(void *opaque) {
goto _compressCleanup; goto _compressCleanup;
} }
/* Compress each sample and sum their sizes (or error) */ /* Compress each sample and sum their sizes (or error) */
totalCompressedSize = 0; totalCompressedSize = dictBufferCapacity;
for (i = 0; i < ctx->nbSamples; ++i) { for (i = 0; i < ctx->nbSamples; ++i) {
const size_t size = ZSTD_compress_usingCDict( const size_t size = ZSTD_compress_usingCDict(
cctx, dst, dstCapacity, ctx->samples + ctx->offsets[i], cctx, dst, dstCapacity, ctx->samples + ctx->offsets[i],