MalwareSourceCode/MSIL/Trojan-Ransom/Win32/G/Trojan-Ransom.Win32.Gimemo.ayt-624a52079bf1703bcd3bcc9d2d3716b6126fd05655e25289d19142f9aae02eb5/Compression/LZMA/Base.cs
2022-08-18 06:28:56 -05:00

71 lines
2.3 KiB
C#

// Decompiled with JetBrains decompiler
// Type: SevenZip.Compression.LZMA.Base
// Assembly: P4CTEMP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 7BE4E538-8555-4C2E-974B-99E556F5462C
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Trojan-Ransom.Win32.Gimemo.ayt-624a52079bf1703bcd3bcc9d2d3716b6126fd05655e25289d19142f9aae02eb5.exe
namespace SevenZip.Compression.LZMA
{
internal abstract class Base
{
public const uint kNumRepDistances = 4;
public const uint kNumStates = 12;
public const int kNumPosSlotBits = 6;
public const int kDicLogSizeMin = 0;
public const int kNumLenToPosStatesBits = 2;
public const uint kNumLenToPosStates = 4;
public const uint kMatchMinLen = 2;
public const int kNumAlignBits = 4;
public const uint kAlignTableSize = 16;
public const uint kAlignMask = 15;
public const uint kStartPosModelIndex = 4;
public const uint kEndPosModelIndex = 14;
public const uint kNumPosModels = 10;
public const uint kNumFullDistances = 128;
public const uint kNumLitPosStatesBitsEncodingMax = 4;
public const uint kNumLitContextBitsMax = 8;
public const int kNumPosStatesBitsMax = 4;
public const uint kNumPosStatesMax = 16;
public const int kNumPosStatesBitsEncodingMax = 4;
public const uint kNumPosStatesEncodingMax = 16;
public const int kNumLowLenBits = 3;
public const int kNumMidLenBits = 3;
public const int kNumHighLenBits = 8;
public const uint kNumLowLenSymbols = 8;
public const uint kNumMidLenSymbols = 8;
public const uint kNumLenSymbols = 272;
public const uint kMatchMaxLen = 273;
public static uint GetLenToPosState(uint len)
{
len -= 2U;
return len < 4U ? len : 3U;
}
public struct State
{
public uint Index;
public void Init() => this.Index = 0U;
public void UpdateChar()
{
if (this.Index < 4U)
this.Index = 0U;
else if (this.Index < 10U)
this.Index -= 3U;
else
this.Index -= 6U;
}
public void UpdateMatch() => this.Index = this.Index < 7U ? 7U : 10U;
public void UpdateRep() => this.Index = this.Index < 7U ? 8U : 11U;
public void UpdateShortRep() => this.Index = this.Index < 7U ? 9U : 11U;
public bool IsCharState() => this.Index < 7U;
}
}
}