From dc404119e5377ce18e49bedeeab3f0ff8b815d87 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Sat, 30 Sep 2017 15:02:40 -0700 Subject: [PATCH] ZSTD_adjustCParams_internal : minor optimization --- lib/compress/zstd_compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compress/zstd_compress.c b/lib/compress/zstd_compress.c index 51cdeaf0..2511ab29 100644 --- a/lib/compress/zstd_compress.c +++ b/lib/compress/zstd_compress.c @@ -652,7 +652,7 @@ ZSTD_compressionParameters ZSTD_adjustCParams_internal(ZSTD_compressionParameter if (dictSize && (srcSize+1<2) /* srcSize unknown */ ) srcSize = minSrcSize; /* presumed small when there is a dictionary */ else if (srcSize == 0) - srcSize -= 1; /* unknown 0 => -1ULL : presumed large */ + srcSize = ZSTD_CONTENTSIZE_UNKNOWN; /* 0 == unknown : presumed large */ /* resize windowLog if input is small enough, to use less memory */ if ( (srcSize < maxWindowResize)