Project Maintenance

This commit is contained in:
Gustave Monce
2021-08-09 20:21:09 +02:00
parent 9865ef7f79
commit 847ce0506d
411 changed files with 5922 additions and 54941 deletions
+16 -4
View File
@@ -18,9 +18,18 @@ namespace SevenZip.Compression.LZMA
public void Init() { Index = 0; }
public void UpdateChar()
{
if (Index < 4) Index = 0;
else if (Index < 10) Index -= 3;
else Index -= 6;
if (Index < 4)
{
Index = 0;
}
else if (Index < 10)
{
Index -= 3;
}
else
{
Index -= 6;
}
}
public void UpdateMatch() { Index = (uint)(Index < 7 ? 7 : 10); }
public void UpdateRep() { Index = (uint)(Index < 7 ? 8 : 11); }
@@ -42,8 +51,11 @@ namespace SevenZip.Compression.LZMA
{
len -= kMatchMinLen;
if (len < kNumLenToPosStates)
{
return len;
return (uint)(kNumLenToPosStates - 1);
}
return kNumLenToPosStates - 1;
}
public const int kNumAlignBits = 4;