]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg Lzma: Update LZMA SDK version to 19.00
authorLiu, WeiX C <weix.c.liu@intel.com>
Tue, 5 Jan 2021 06:14:03 +0000 (14:14 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 8 Jan 2021 10:03:53 +0000 (10:03 +0000)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3101
New formal release in https://www.7-zip.org/sdk.html is 19.00.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Wei Liu <weix.c.liu@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
MdeModulePkg/Library/LzmaCustomDecompressLib/LZMA-SDK-README.txt
MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaArchCustomDecompressLib.inf
MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/7zTypes.h
MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/7zVersion.h
MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/CpuArch.h
MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/LzFind.c
MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/LzmaDec.c
MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/DOC/lzma-history.txt
MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/DOC/lzma-sdk.txt
MdeModulePkg/MdeModulePkg.ci.yaml

index 3f3895b4cff909313943c3ef93687975bba61f96..8095b6edd28f31b66f87b6855565aa373bcec198 100644 (file)
@@ -1,4 +1,4 @@
-LzmaCustomDecompressLib is based on the LZMA SDK 18.05.\r
-LZMA SDK 18.05 was placed in the public domain on\r
-2018-04-30.  It was released on the\r
+LzmaCustomDecompressLib is based on the LZMA SDK 19.00.\r
+LZMA SDK 19.00 was placed in the public domain on\r
+2019-02-21.  It was released on the\r
 http://www.7-zip.org/sdk.html website.\r
index d789e7dc422eeab9b7eacb4ac6c3ceb923c28a4d..3a0647e7f80448345878ed260744f19aa9023a2c 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 #  LzmaArchCustomDecompressLib produces LZMA custom decompression algorithm with the converter for the different arch code.\r
 #\r
-#  It is based on the LZMA SDK 18.05\r
-#  LZMA SDK 18.05 was placed in the public domain on 2018-04-30.\r
+#  It is based on the LZMA SDK 19.00\r
+#  LZMA SDK 19.00 was placed in the public domain on 2019-02-21.\r
 #  It was released on the http://www.7-zip.org/sdk.html website.\r
 #\r
-#  Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2012 - 2020, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 #\r
index 4ed1d83a404c8c2001f3c6e0539d7abab780d6ae..39e66136c466c9e0d541eeeac09fd03e2c9dc367 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 #  LzmaCustomDecompressLib produces LZMA custom decompression algorithm.\r
 #\r
-#  It is based on the LZMA SDK 18.05.\r
-#  LZMA SDK 18.05 was placed in the public domain on 2018-04-30.\r
+#  It is based on the LZMA SDK 19.00.\r
+#  LZMA SDK 19.00 was placed in the public domain on 2019-02-21.\r
 #  It was released on the http://www.7-zip.org/sdk.html website.\r
 #\r
-#  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 #\r
index c89b5c2433f1605c61327b9c42c73c87771fb2ef..42b7040dd79267a14bf84086d30258e2fc9a278f 100644 (file)
@@ -1,5 +1,5 @@
 /* 7zTypes.h -- Basic types\r
-2017-07-17 : Igor Pavlov : Public domain */\r
+2018-08-04 : Igor Pavlov : Public domain */\r
 \r
 #ifndef __7Z_TYPES_H\r
 #define __7Z_TYPES_H\r
@@ -107,7 +107,8 @@ typedef UInt32 SizeT;
 typedef size_t SizeT;\r
 #endif\r
 \r
-typedef int Bool;\r
+typedef int BoolInt;\r
+/* typedef BoolInt Bool; */\r
 #define True 1\r
 #define False 0\r
 \r
index ed3aa94270c96d25df6f3973fa52adbc274115bf..0074c64be96f1527b652f7b51f9c6cb6f6713eff 100644 (file)
@@ -1,7 +1,7 @@
-#define MY_VER_MAJOR 18\r
-#define MY_VER_MINOR 05\r
+#define MY_VER_MAJOR 19\r
+#define MY_VER_MINOR 00\r
 #define MY_VER_BUILD 0\r
-#define MY_VERSION_NUMBERS "18.05"\r
+#define MY_VERSION_NUMBERS "19.00"\r
 #define MY_VERSION MY_VERSION_NUMBERS\r
 \r
 #ifdef MY_CPU_NAME\r
@@ -10,7 +10,7 @@
   #define MY_VERSION_CPU MY_VERSION\r
 #endif\r
 \r
-#define MY_DATE "2018-04-30"\r
+#define MY_DATE "2019-02-21"\r
 #undef MY_COPYRIGHT\r
 #undef MY_VERSION_COPYRIGHT_DATE\r
 #define MY_AUTHOR_NAME "Igor Pavlov"\r
index 7fb27282c721a077782daf16bea7d09101853af4..5f74c1c0cbd7430deedd638da4e966c1176205d0 100644 (file)
@@ -1,5 +1,5 @@
 /* CpuArch.h -- CPU specific code\r
-2017-09-04 : Igor Pavlov : Public domain */\r
+2018-02-18 : Igor Pavlov : Public domain */\r
 \r
 #ifndef __CPU_ARCH_H\r
 #define __CPU_ARCH_H\r
@@ -318,15 +318,16 @@ enum
 \r
 void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d);\r
 \r
-Bool x86cpuid_CheckAndRead(Cx86cpuid *p);\r
+BoolInt x86cpuid_CheckAndRead(Cx86cpuid *p);\r
 int x86cpuid_GetFirm(const Cx86cpuid *p);\r
 \r
 #define x86cpuid_GetFamily(ver) (((ver >> 16) & 0xFF0) | ((ver >> 8) & 0xF))\r
 #define x86cpuid_GetModel(ver)  (((ver >> 12) &  0xF0) | ((ver >> 4) & 0xF))\r
 #define x86cpuid_GetStepping(ver) (ver & 0xF)\r
 \r
-Bool CPU_Is_InOrder();\r
-Bool CPU_Is_Aes_Supported();\r
+BoolInt CPU_Is_InOrder();\r
+BoolInt CPU_Is_Aes_Supported();\r
+BoolInt CPU_IsSupported_PageGB();\r
 \r
 #endif\r
 \r
index 8765cbebfc9b8e6436fb491b671969f8425b17b4..670a9fab125de95aeb0c4224b23b5f20db164a85 100644 (file)
@@ -1,5 +1,5 @@
 /* LzFind.c -- Match finder for LZ algorithms\r
-2017-06-10 : Igor Pavlov : Public domain */\r
+2018-07-08 : Igor Pavlov : Public domain */\r
 \r
 #include "Precomp.h"\r
 \r
@@ -140,7 +140,7 @@ static void MatchFinder_SetDefaultSettings(CMatchFinder *p)
 \r
 void MatchFinder_Construct(CMatchFinder *p)\r
 {\r
-  UInt32 i;\r
+  unsigned i;\r
   p->bufferBase = NULL;\r
   p->directInput = 0;\r
   p->hash = NULL;\r
@@ -149,7 +149,7 @@ void MatchFinder_Construct(CMatchFinder *p)
 \r
   for (i = 0; i < 256; i++)\r
   {\r
-    UInt32 r = i;\r
+    UInt32 r = (UInt32)i;\r
     unsigned j;\r
     for (j = 0; j < 8; j++)\r
       r = (r >> 1) ^ (kCrcPoly & ((UInt32)0 - (r & 1)));\r
@@ -370,6 +370,8 @@ static void MatchFinder_Normalize(CMatchFinder *p)
   MatchFinder_ReduceOffsets(p, subValue);\r
 }\r
 \r
+\r
+MY_NO_INLINE\r
 static void MatchFinder_CheckLimits(CMatchFinder *p)\r
 {\r
   if (p->pos == kMaxValForNormalize)\r
@@ -381,10 +383,16 @@ static void MatchFinder_CheckLimits(CMatchFinder *p)
   MatchFinder_SetLimits(p);\r
 }\r
 \r
-static UInt32 * Hc_GetMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,\r
+\r
+/*\r
+  (lenLimit > maxLen)\r
+*/\r
+MY_FORCE_INLINE\r
+static UInt32 * Hc_GetMatchesSpec(unsigned lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,\r
     UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue,\r
-    UInt32 *distances, UInt32 maxLen)\r
+    UInt32 *distances, unsigned maxLen)\r
 {\r
+  /*\r
   son[_cyclicBufferPos] = curMatch;\r
   for (;;)\r
   {\r
@@ -402,7 +410,8 @@ static UInt32 * Hc_GetMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos,
             break;\r
         if (maxLen < len)\r
         {\r
-          *distances++ = maxLen = len;\r
+          maxLen = len;\r
+          *distances++ = len;\r
           *distances++ = delta - 1;\r
           if (len == lenLimit)\r
             return distances;\r
@@ -410,15 +419,58 @@ static UInt32 * Hc_GetMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos,
       }\r
     }\r
   }\r
+  */\r
+\r
+  const Byte *lim = cur + lenLimit;\r
+  son[_cyclicBufferPos] = curMatch;\r
+  do\r
+  {\r
+    UInt32 delta = pos - curMatch;\r
+    if (delta >= _cyclicBufferSize)\r
+      break;\r
+    {\r
+      ptrdiff_t diff;\r
+      curMatch = son[_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)];\r
+      diff = (ptrdiff_t)0 - delta;\r
+      if (cur[maxLen] == cur[maxLen + diff])\r
+      {\r
+        const Byte *c = cur;\r
+        while (*c == c[diff])\r
+        {\r
+          if (++c == lim)\r
+          {\r
+            distances[0] = (UInt32)(lim - cur);\r
+            distances[1] = delta - 1;\r
+            return distances + 2;\r
+          }\r
+        }\r
+        {\r
+          unsigned len = (unsigned)(c - cur);\r
+          if (maxLen < len)\r
+          {\r
+            maxLen = len;\r
+            distances[0] = (UInt32)len;\r
+            distances[1] = delta - 1;\r
+            distances += 2;\r
+          }\r
+        }\r
+      }\r
+    }\r
+  }\r
+  while (--cutValue);\r
+\r
+  return distances;\r
 }\r
 \r
+\r
+MY_FORCE_INLINE\r
 UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,\r
     UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue,\r
     UInt32 *distances, UInt32 maxLen)\r
 {\r
-  CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1;\r
-  CLzRef *ptr1 = son + (_cyclicBufferPos << 1);\r
-  UInt32 len0 = 0, len1 = 0;\r
+  CLzRef *ptr0 = son + ((size_t)_cyclicBufferPos << 1) + 1;\r
+  CLzRef *ptr1 = son + ((size_t)_cyclicBufferPos << 1);\r
+  unsigned len0 = 0, len1 = 0;\r
   for (;;)\r
   {\r
     UInt32 delta = pos - curMatch;\r
@@ -428,9 +480,10 @@ UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byt
       return distances;\r
     }\r
     {\r
-      CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1);\r
+      CLzRef *pair = son + ((size_t)(_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1);\r
       const Byte *pb = cur - delta;\r
-      UInt32 len = (len0 < len1 ? len0 : len1);\r
+      unsigned len = (len0 < len1 ? len0 : len1);\r
+      UInt32 pair0 = pair[0];\r
       if (pb[len] == cur[len])\r
       {\r
         if (++len != lenLimit && pb[len] == cur[len])\r
@@ -439,11 +492,12 @@ UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byt
               break;\r
         if (maxLen < len)\r
         {\r
-          *distances++ = maxLen = len;\r
+          maxLen = (UInt32)len;\r
+          *distances++ = (UInt32)len;\r
           *distances++ = delta - 1;\r
           if (len == lenLimit)\r
           {\r
-            *ptr1 = pair[0];\r
+            *ptr1 = pair0;\r
             *ptr0 = pair[1];\r
             return distances;\r
           }\r
@@ -470,9 +524,9 @@ UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byt
 static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,\r
     UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue)\r
 {\r
-  CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1;\r
-  CLzRef *ptr1 = son + (_cyclicBufferPos << 1);\r
-  UInt32 len0 = 0, len1 = 0;\r
+  CLzRef *ptr0 = son + ((size_t)_cyclicBufferPos << 1) + 1;\r
+  CLzRef *ptr1 = son + ((size_t)_cyclicBufferPos << 1);\r
+  unsigned len0 = 0, len1 = 0;\r
   for (;;)\r
   {\r
     UInt32 delta = pos - curMatch;\r
@@ -482,9 +536,9 @@ static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const
       return;\r
     }\r
     {\r
-      CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1);\r
+      CLzRef *pair = son + ((size_t)(_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1);\r
       const Byte *pb = cur - delta;\r
-      UInt32 len = (len0 < len1 ? len0 : len1);\r
+      unsigned len = (len0 < len1 ? len0 : len1);\r
       if (pb[len] == cur[len])\r
       {\r
         while (++len != lenLimit)\r
@@ -522,13 +576,13 @@ static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const
   p->buffer++; \\r
   if (++p->pos == p->posLimit) MatchFinder_CheckLimits(p);\r
 \r
-#define MOVE_POS_RET MOVE_POS return offset;\r
+#define MOVE_POS_RET MOVE_POS return (UInt32)offset;\r
 \r
 static void MatchFinder_MovePos(CMatchFinder *p) { MOVE_POS; }\r
 \r
 #define GET_MATCHES_HEADER2(minLen, ret_op) \\r
-  UInt32 lenLimit; UInt32 hv; const Byte *cur; UInt32 curMatch; \\r
-  lenLimit = p->lenLimit; { if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; }} \\r
+  unsigned lenLimit; UInt32 hv; const Byte *cur; UInt32 curMatch; \\r
+  lenLimit = (unsigned)p->lenLimit; { if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; }} \\r
   cur = p->buffer;\r
 \r
 #define GET_MATCHES_HEADER(minLen) GET_MATCHES_HEADER2(minLen, return 0)\r
@@ -537,22 +591,22 @@ static void MatchFinder_MovePos(CMatchFinder *p) { MOVE_POS; }
 #define MF_PARAMS(p) p->pos, p->buffer, p->son, p->cyclicBufferPos, p->cyclicBufferSize, p->cutValue\r
 \r
 #define GET_MATCHES_FOOTER(offset, maxLen) \\r
-  offset = (UInt32)(GetMatchesSpec1(lenLimit, curMatch, MF_PARAMS(p), \\r
-  distances + offset, maxLen) - distances); MOVE_POS_RET;\r
+  offset = (unsigned)(GetMatchesSpec1((UInt32)lenLimit, curMatch, MF_PARAMS(p), \\r
+  distances + offset, (UInt32)maxLen) - distances); MOVE_POS_RET;\r
 \r
 #define SKIP_FOOTER \\r
-  SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS;\r
+  SkipMatchesSpec((UInt32)lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS;\r
 \r
 #define UPDATE_maxLen { \\r
     ptrdiff_t diff = (ptrdiff_t)0 - d2; \\r
     const Byte *c = cur + maxLen; \\r
     const Byte *lim = cur + lenLimit; \\r
     for (; c != lim; c++) if (*(c + diff) != *c) break; \\r
-    maxLen = (UInt32)(c - cur); }\r
+    maxLen = (unsigned)(c - cur); }\r
 \r
 static UInt32 Bt2_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)\r
 {\r
-  UInt32 offset;\r
+  unsigned offset;\r
   GET_MATCHES_HEADER(2)\r
   HASH2_CALC;\r
   curMatch = p->hash[hv];\r
@@ -563,7 +617,7 @@ static UInt32 Bt2_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
 \r
 UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)\r
 {\r
-  UInt32 offset;\r
+  unsigned offset;\r
   GET_MATCHES_HEADER(3)\r
   HASH_ZIP_CALC;\r
   curMatch = p->hash[hv];\r
@@ -574,7 +628,8 @@ UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
 \r
 static UInt32 Bt3_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)\r
 {\r
-  UInt32 h2, d2, maxLen, offset, pos;\r
+  UInt32 h2, d2, pos;\r
+  unsigned maxLen, offset;\r
   UInt32 *hash;\r
   GET_MATCHES_HEADER(3)\r
 \r
@@ -596,12 +651,12 @@ static UInt32 Bt3_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
   if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur)\r
   {\r
     UPDATE_maxLen\r
-    distances[0] = maxLen;\r
+    distances[0] = (UInt32)maxLen;\r
     distances[1] = d2 - 1;\r
     offset = 2;\r
     if (maxLen == lenLimit)\r
     {\r
-      SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p));\r
+      SkipMatchesSpec((UInt32)lenLimit, curMatch, MF_PARAMS(p));\r
       MOVE_POS_RET;\r
     }\r
   }\r
@@ -611,7 +666,8 @@ static UInt32 Bt3_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
 \r
 static UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)\r
 {\r
-  UInt32 h2, h3, d2, d3, maxLen, offset, pos;\r
+  UInt32 h2, h3, d2, d3, pos;\r
+  unsigned maxLen, offset;\r
   UInt32 *hash;\r
   GET_MATCHES_HEADER(4)\r
 \r
@@ -634,7 +690,8 @@ static UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
 \r
   if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur)\r
   {\r
-    distances[0] = maxLen = 2;\r
+    maxLen = 2;\r
+    distances[0] = 2;\r
     distances[1] = d2 - 1;\r
     offset = 2;\r
   }\r
@@ -650,10 +707,10 @@ static UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
   if (offset != 0)\r
   {\r
     UPDATE_maxLen\r
-    distances[(size_t)offset - 2] = maxLen;\r
+    distances[(size_t)offset - 2] = (UInt32)maxLen;\r
     if (maxLen == lenLimit)\r
     {\r
-      SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p));\r
+      SkipMatchesSpec((UInt32)lenLimit, curMatch, MF_PARAMS(p));\r
       MOVE_POS_RET;\r
     }\r
   }\r
@@ -743,7 +800,8 @@ static UInt32 Bt5_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
 \r
 static UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)\r
 {\r
-  UInt32 h2, h3, d2, d3, maxLen, offset, pos;\r
+  UInt32 h2, h3, d2, d3, pos;\r
+  unsigned maxLen, offset;\r
   UInt32 *hash;\r
   GET_MATCHES_HEADER(4)\r
 \r
@@ -766,7 +824,8 @@ static UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
 \r
   if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur)\r
   {\r
-    distances[0] = maxLen = 2;\r
+    maxLen = 2;\r
+    distances[0] = 2;\r
     distances[1] = d2 - 1;\r
     offset = 2;\r
   }\r
@@ -782,7 +841,7 @@ static UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
   if (offset != 0)\r
   {\r
     UPDATE_maxLen\r
-    distances[(size_t)offset - 2] = maxLen;\r
+    distances[(size_t)offset - 2] = (UInt32)maxLen;\r
     if (maxLen == lenLimit)\r
     {\r
       p->son[p->cyclicBufferPos] = curMatch;\r
@@ -793,7 +852,7 @@ static UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
   if (maxLen < 3)\r
     maxLen = 3;\r
 \r
-  offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),\r
+  offset = (unsigned)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),\r
       distances + offset, maxLen) - (distances));\r
   MOVE_POS_RET\r
 }\r
@@ -879,12 +938,12 @@ static UInt32 Hc5_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
 \r
 UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)\r
 {\r
-  UInt32 offset;\r
+  unsigned offset;\r
   GET_MATCHES_HEADER(3)\r
   HASH_ZIP_CALC;\r
   curMatch = p->hash[hv];\r
   p->hash[hv] = p->pos;\r
-  offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),\r
+  offset = (unsigned)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),\r
       distances, 2) - (distances));\r
   MOVE_POS_RET\r
 }\r
index a262319928a9eba54dd55eb0732cb691444fce02..80fb74525ad9a07338144b7ca731bebd50655e25 100644 (file)
@@ -1,15 +1,15 @@
 /* LzmaDec.c -- LZMA Decoder\r
-2018-02-28 : Igor Pavlov : Public domain */\r
+2018-07-04 : Igor Pavlov : Public domain */\r
 \r
 #include "Precomp.h"\r
 \r
-/* #include "CpuArch.h" */\r
-#include "LzmaDec.h"\r
-\r
 #ifndef EFIAPI\r
 #include <string.h>\r
 #endif\r
 \r
+/* #include "CpuArch.h" */\r
+#include "LzmaDec.h"\r
+\r
 #define kNumTopBits 24\r
 #define kTopValue ((UInt32)1 << kNumTopBits)\r
 \r
@@ -21,7 +21,7 @@
 \r
 #define NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | (*buf++); }\r
 \r
-#define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound)\r
+#define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * (UInt32)ttt; if (code < bound)\r
 #define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits));\r
 #define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits));\r
 #define GET_BIT2(p, i, A0, A1) IF_BIT_0(p) \\r
@@ -68,7 +68,7 @@
 \r
 #define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); }\r
 \r
-#define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound)\r
+#define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * (UInt32)ttt; if (code < bound)\r
 #define UPDATE_0_CHECK range = bound;\r
 #define UPDATE_1_CHECK range -= bound; code -= bound;\r
 #define GET_BIT2_CHECK(p, i, A0, A1) IF_BIT_0_CHECK(p) \\r
@@ -541,7 +541,7 @@ int MY_FAST_CALL LZMA_DECODE_REAL(CLzmaDec *p, SizeT limit, const Byte *bufLimit
         curLen = ((rem < len) ? (unsigned)rem : len);\r
         pos = dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0);\r
 \r
-        processedPos += curLen;\r
+        processedPos += (UInt32)curLen;\r
 \r
         len -= curLen;\r
         if (curLen <= dicBufSize - pos)\r
@@ -549,7 +549,7 @@ int MY_FAST_CALL LZMA_DECODE_REAL(CLzmaDec *p, SizeT limit, const Byte *bufLimit
           Byte *dest = dic + dicPos;\r
           ptrdiff_t src = (ptrdiff_t)pos - (ptrdiff_t)dicPos;\r
           const Byte *lim = dest + curLen;\r
-          dicPos += curLen;\r
+          dicPos += (SizeT)curLen;\r
           do\r
             *(dest) = (Byte)*(dest + src);\r
           while (++dest != lim);\r
@@ -574,14 +574,14 @@ int MY_FAST_CALL LZMA_DECODE_REAL(CLzmaDec *p, SizeT limit, const Byte *bufLimit
   p->buf = buf;\r
   p->range = range;\r
   p->code = code;\r
-  p->remainLen = len;\r
+  p->remainLen = (UInt32)len;\r
   p->dicPos = dicPos;\r
   p->processedPos = processedPos;\r
   p->reps[0] = rep0;\r
   p->reps[1] = rep1;\r
   p->reps[2] = rep2;\r
   p->reps[3] = rep3;\r
-  p->state = state;\r
+  p->state = (UInt32)state;\r
 \r
   return SZ_OK;\r
 }\r
@@ -603,8 +603,8 @@ static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit)
     if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len)\r
       p->checkDicSize = p->prop.dicSize;\r
 \r
-    p->processedPos += len;\r
-    p->remainLen -= len;\r
+    p->processedPos += (UInt32)len;\r
+    p->remainLen -= (UInt32)len;\r
     while (len != 0)\r
     {\r
       len--;\r
@@ -852,7 +852,7 @@ static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inS
 }\r
 \r
 \r
-void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState)\r
+void LzmaDec_InitDicAndState(CLzmaDec *p, BoolInt initDic, BoolInt initState)\r
 {\r
   p->remainLen = kMatchSpecLenStart + 1;\r
   p->tempBufSize = 0;\r
@@ -981,10 +981,10 @@ SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *sr
         p->tempBufSize = rem;\r
         if (rem < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow)\r
         {\r
-          int dummyRes = LzmaDec_TryDummy(p, p->tempBuf, rem);\r
+          int dummyRes = LzmaDec_TryDummy(p, p->tempBuf, (SizeT)rem);\r
           if (dummyRes == DUMMY_ERROR)\r
           {\r
-            (*srcLen) += lookAhead;\r
+            (*srcLen) += (SizeT)lookAhead;\r
             *status = LZMA_STATUS_NEEDS_MORE_INPUT;\r
             return SZ_OK;\r
           }\r
@@ -1007,9 +1007,9 @@ SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *sr
             return SZ_ERROR_FAIL; /* some internal error */\r
           lookAhead -= rem;\r
         }\r
-        (*srcLen) += lookAhead;\r
+        (*srcLen) += (SizeT)lookAhead;\r
         src += lookAhead;\r
-        inSize -= lookAhead;\r
+        inSize -= (SizeT)lookAhead;\r
         p->tempBufSize = 0;\r
       }\r
   }\r
index 5ad9a5b1b94df5c35bd9ae8d93c86d9fc22153ee..96090b2b45856bc9f5314ce14ea4d04f8b1824a6 100644 (file)
@@ -1,6 +1,28 @@
 HISTORY of the LZMA SDK\r
 -----------------------\r
 \r
+19.00          2019-02-21\r
+-------------------------\r
+- Encryption strength for 7z archives was increased:\r
+  the size of random initialization vector was increased from 64-bit to 128-bit,\r
+  and the pseudo-random number generator was improved.\r
+- The bug in 7zIn.c code was fixed.\r
+\r
+\r
+18.06          2018-12-30\r
+-------------------------\r
+- The speed for LZMA/LZMA2 compressing was increased by 3-10%,\r
+  and there are minor changes in compression ratio.\r
+- Some bugs were fixed.\r
+- The bug in 7-Zip 18.02-18.05 was fixed:\r
+  There was memory leak in multithreading xz decoder - XzDecMt_Decode(),\r
+  if xz stream contains only one block.\r
+- The changes for MSVS compiler makefiles:\r
+   - the makefiles now use "PLATFORM" macroname with values (x64, x86, arm64)\r
+     instead of "CPU" macroname with values (AMD64, ARM64).\r
+   - the makefiles by default now use static version of the run-time library.\r
+\r
+\r
 18.05          2018-04-30\r
 -------------------------\r
 - The speed for LZMA/LZMA2 compressing was increased\r
index bf0b3a5ee62d2ab89bc65ccde17bc6b5019de1f1..6bb6fa194e65a9d2be3cfdae4fe5e5f9e082f336 100644 (file)
@@ -1,4 +1,4 @@
-LZMA SDK 18.05\r
+LZMA SDK 19.00\r
 --------------\r
 \r
 LZMA SDK provides the documentation, samples, header files,\r
index 20d53fc5a5fa8442dc8b2e6cec2d426cd32049b0..45783f12c1266ee19ea2c063ad9b3c020c6608c1 100644 (file)
@@ -20,7 +20,9 @@
         ## Both file path and directory path are accepted.\r
         "IgnoreFiles": [\r
             "Library/BrotliCustomDecompressLib/brotli",\r
-            "Universal/RegularExpressionDxe/oniguruma"\r
+            "Universal/RegularExpressionDxe/oniguruma",\r
+            "Library/LzmaCustomDecompressLib/Sdk/DOC",\r
+            "Library/LzmaCustomDecompressLib/Sdk/C"\r
         ]\r
     },\r
     ## options defined ci/Plugin/CompilerPlugin\r