]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
ZSTD_adjustCParams_internal : minor optimization
authorYann Collet <cyan@fb.com>
Sat, 30 Sep 2017 22:02:40 +0000 (15:02 -0700)
committerYann Collet <cyan@fb.com>
Sat, 30 Sep 2017 22:02:40 +0000 (15:02 -0700)
lib/compress/zstd_compress.c

index 51cdeaf032b149acf853381af7ef6d4a9092cd55..2511ab29e0a895dc33d5a6a6bd9c4ed5fef5c4cf 100644 (file)
@@ -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)