public int GetNextSymbol(InputBuffer input)
{
uint num = input.TryLoad16Bits();
if (input.AvailableBits == 0)
{
return(-1);
}
int index = this.table[(num & this.tableMask)];
if (index < 0)
{
uint num3 = ((uint)1) << this.tableBits;
do
{
index = -index;
if ((num & num3) == 0)
{
index = this.left[index];
}
else
{
index = this.right[index];
}
num3 = num3 << 1;
}while (index < 0);
}
if (this.codeLengthArray[index] > input.AvailableBits)
{
return(-1);
}
input.SkipBits(this.codeLengthArray[index]);
return(index);
}