]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Rename `base` -> `prefixLowest`
authorW. Felix Handte <w@felixhandte.com>
Wed, 23 May 2018 19:10:18 +0000 (15:10 -0400)
committerW. Felix Handte <w@felixhandte.com>
Wed, 13 Jun 2018 18:58:36 +0000 (14:58 -0400)
lib/compress/zstd_lazy.c

index 67289a0a40d8b0f8f81a9d4086374fb036d74a6b..d9695f10a7956569392f5feec5b3f24fe5d8d565 100644 (file)
@@ -493,7 +493,7 @@ size_t ZSTD_compressBlock_lazy_generic(
     const BYTE* anchor = istart;
     const BYTE* const iend = istart + srcSize;
     const BYTE* const ilimit = iend - 8;
-    const BYTE* const base = ms->window.base + ms->window.dictLimit;
+    const BYTE* const prefixLowest = ms->window.base + ms->window.dictLimit;
 
     typedef size_t (*searchMax_f)(
                         ZSTD_matchState_t* ms, ZSTD_compressionParameters const* cParams,
@@ -506,9 +506,9 @@ size_t ZSTD_compressBlock_lazy_generic(
     (void)dictMode;
 
     /* init */
-    ip += (ip==base);
+    ip += (ip==prefixLowest);
     ms->nextToUpdate3 = ms->nextToUpdate;
-    {   U32 const maxRep = (U32)(ip-base);
+    {   U32 const maxRep = (U32)(ip-prefixLowest);
         if (offset_2 > maxRep) savedOffset = offset_2, offset_2 = 0;
         if (offset_1 > maxRep) savedOffset = offset_1, offset_1 = 0;
     }
@@ -586,7 +586,7 @@ size_t ZSTD_compressBlock_lazy_generic(
          */
         /* catch up */
         if (offset) {
-            while ( ((start > anchor) & (start - (offset-ZSTD_REP_MOVE) > base))
+            while ( ((start > anchor) & (start - (offset-ZSTD_REP_MOVE) > prefixLowest))
                  && (start[-1] == (start-(offset-ZSTD_REP_MOVE))[-1]) )  /* only search for offset within prefix */
                 { start--; matchLength++; }
             offset_2 = offset_1; offset_1 = (U32)(offset - ZSTD_REP_MOVE);