public static int Decode(int[] symbolList, int bitCount)
{
// MyLog.INFO.WriteLine("len = " + symbolList.Length + " bitcount=" + bitCount);
// MyLog.Writer.FlushCache();
Debug.Assert(bitCount>0 && bitCount <= symbolList.Length);
int value = 0;
for (int i = 0; i < bitCount; i++)
{
if (symbolList[symbolList.Length -i -1] == 1)
{
value += Convert.ToInt32(Math.Pow(2, bitCount -i -1));
}
}
return value;
}