]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Revert "Limit `ZSTD_maxCLevel` to 21 for 32-bit binaries." 2940/head
authorYann Collet <Cyan4973@users.noreply.github.com>
Mon, 20 Dec 2021 19:43:14 +0000 (11:43 -0800)
committerGitHub <noreply@github.com>
Mon, 20 Dec 2021 19:43:14 +0000 (11:43 -0800)
.github/workflows/dev-short-tests.yml
doc/zstd_manual.html
lib/compress/clevels.h
lib/compress/zstd_compress.c
tests/fuzzer.c
tests/playTests.sh

index b5cd2415dec0531366bd4c6cf285f0b5901400ce..f06dfdb614f24d9382ba5d774551198baf5a1e0f 100644 (file)
@@ -30,8 +30,6 @@ jobs:
     steps:
     - uses: actions/checkout@v2
     - name: make check on 32-bit
-      env:
-        CHECK_CONSTRAINED_MEM: true
       run: |
         sudo apt update
         APT_PACKAGES="gcc-multilib" make apt-install
index 7d2e1c6caafb4e28ff72e1e8b836887d113ae92d..3d62f595281bc7a919427628c46ef08232400a42 100644 (file)
@@ -40,7 +40,7 @@
   functions.
 
   The library supports regular compression levels from 1 up to ZSTD_maxCLevel(),
-  which is 22 in most cases. Levels >= 20, labeled `--ultra`, should be used with
+  which is currently 22. Levels >= 20, labeled `--ultra`, should be used with
   caution, as they require more memory. The library also offers negative
   compression levels, which extend the range of speed vs. ratio preferences.
   The lower the level, the faster the speed (at the cost of compression).
index c2ceb6384ec93ad3e678bfb7305421305468961a..7ed2e00490bf1c0ffc91b8e66702a1216909e946 100644 (file)
@@ -16,8 +16,7 @@
 
 /*-=====  Pre-defined compression levels  =====-*/
 
-#define ZSTD_MAX_CLEVEL           22
-#define ZSTD_MAX_32BIT_CLEVEL     21
+#define ZSTD_MAX_CLEVEL     22
 
 #ifdef __GNUC__
 __attribute__((__unused__))
index e3d40c5400b60a4741402baa29eb4f99d644a893..34f8e970f1a049a3ff86d213cbcfed14fa438c76 100644 (file)
@@ -6165,7 +6165,7 @@ size_t ZSTD_endStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output)
 /*-=====  Pre-defined compression levels  =====-*/
 #include "clevels.h"
 
-int ZSTD_maxCLevel(void) { return MEM_32bits() ? ZSTD_MAX_32BIT_CLEVEL : ZSTD_MAX_CLEVEL; }
+int ZSTD_maxCLevel(void) { return ZSTD_MAX_CLEVEL; }
 int ZSTD_minCLevel(void) { return (int)-ZSTD_TARGETLENGTH_MAX; }
 int ZSTD_defaultCLevel(void) { return ZSTD_CLEVEL_DEFAULT; }
 
@@ -6261,7 +6261,7 @@ static ZSTD_compressionParameters ZSTD_getCParams_internal(int compressionLevel,
     /* row */
     if (compressionLevel == 0) row = ZSTD_CLEVEL_DEFAULT;   /* 0 == default */
     else if (compressionLevel < 0) row = 0;   /* entry 0 is baseline for fast mode */
-    else if (compressionLevel > ZSTD_maxCLevel()) row = ZSTD_maxCLevel();
+    else if (compressionLevel > ZSTD_MAX_CLEVEL) row = ZSTD_MAX_CLEVEL;
     else row = compressionLevel;
 
     {   ZSTD_compressionParameters cp = ZSTD_defaultCParameters[tableID][row];
index c35be8e2607ccc4156c7384910ccce28f949934e..d168d657611739a5d36516fbc5651182709341a9 100644 (file)
@@ -1982,7 +1982,7 @@ static int basicUnitTests(U32 const seed, double compressibility)
             int const rowLevelEnd = 8;
 
             DISPLAYLEVEL(3, "test%3i : flat-dictionary efficiency test : \n", testNb++);
-            assert(maxLevel == (MEM_32bits() ? 21 : 22));
+            assert(maxLevel == 22);
             RDG_genBuffer(CNBuffer, flatdictSize + contentSize, compressibility, 0., seed);
             DISPLAYLEVEL(4, "content hash : %016llx;  dict hash : %016llx \n",
                         (unsigned long long)XXH64(contentStart, contentSize, 0),
index 11240898eac2e996139984f2c65b0082631f525e..a772b61ff7c7e2d6d28a3185f152ad549e16c623 100755 (executable)
@@ -1568,11 +1568,6 @@ elif [ "$longCSize19wlog23" -gt "$optCSize19wlog23" ]; then
     exit 1
 fi
 
-if [ -n "$CHECK_CONSTRAINED_MEM" ]; then
-    println "\n===>  zsdt constrained memory tests "
-    # shellcheck disable=SC2039
-    (ulimit -Sv 500000 ; datagen -g2M | zstd -22 --single-thread --ultra > /dev/null)
-fi
 
 if [ "$1" != "--test-large-data" ]; then
     println "Skipping large data tests"