Ejemplo n.º 1
0
        // Token: 0x060018E0 RID: 6368 RVA: 0x00043910 File Offset: 0x00041B10
        private void method_6()
        {
            int num = 0;

            try
            {
                num = this.stream_0.ReadByte();
            }
            catch (Exception)
            {
                Stream1.smethod_0();
            }
            if (num == -1)
            {
                Stream1.smethod_0();
            }
            this.int_10  = (this.int_10 << 8 | (num & 255));
            this.int_11 += 8;
        }
Ejemplo n.º 2
0
        // Token: 0x060018E6 RID: 6374 RVA: 0x00043C54 File Offset: 0x00041E54
        private void method_12()
        {
            byte[] array = new byte[256];
            int    num   = Class320.int_1 * this.int_9;

            this.int_8 = this.method_9(24);
            this.method_11();
            int num2 = this.int_12 + 1;
            int num3 = -1;
            int num4 = 0;

            for (int i = 0; i <= 255; i++)
            {
                this.int_14[i] = 0;
            }
            for (int j = 0; j <= 255; j++)
            {
                array[j] = (byte)j;
            }
            this.int_7 = -1;
            if (num4 == 0)
            {
                num3++;
                num4 = Class320.int_7;
            }
            num4--;
            int num5 = (int)this.byte_2[num3];
            int num6 = this.int_18[num5];
            int k;
            int num7;

            for (k = this.method_7(num6); k > this.int_15[num5][num6]; k = (k << 1 | num7))
            {
                if (num6 > 20)
                {
                    throw new BZip2Exception("Bzip data error");
                }
                num6++;
                while (this.int_11 < 1)
                {
                    this.method_6();
                }
                num7 = (this.int_10 >> this.int_11 - 1 & 1);
                this.int_11--;
            }
            if (k - this.int_16[num5][num6] >= 0 && k - this.int_16[num5][num6] < Class320.int_2)
            {
                int num8 = this.int_17[num5][k - this.int_16[num5][num6]];
                while (num8 != num2)
                {
                    if (num8 != Class320.int_4)
                    {
                        if (num8 != Class320.int_5)
                        {
                            this.int_7++;
                            if (this.int_7 >= num)
                            {
                                Stream1.smethod_1();
                            }
                            byte b = array[num8 - 1];
                            this.int_14[(int)this.byte_0[(int)b]]++;
                            this.byte_4[this.int_7] = this.byte_0[(int)b];
                            for (int l = num8 - 1; l > 0; l--)
                            {
                                array[l] = array[l - 1];
                            }
                            array[0] = b;
                            if (num4 == 0)
                            {
                                num3++;
                                num4 = Class320.int_7;
                            }
                            num4--;
                            num5 = (int)this.byte_2[num3];
                            num6 = this.int_18[num5];
                            for (k = this.method_7(num6); k > this.int_15[num5][num6]; k = (k << 1 | num7))
                            {
                                num6++;
                                while (this.int_11 < 1)
                                {
                                    this.method_6();
                                }
                                num7 = (this.int_10 >> this.int_11 - 1 & 1);
                                this.int_11--;
                            }
                            num8 = this.int_17[num5][k - this.int_16[num5][num6]];
                            continue;
                        }
                    }
                    int m    = -1;
                    int num9 = 1;
                    do
                    {
                        if (num8 == Class320.int_4)
                        {
                            m += num9;
                        }
                        else if (num8 == Class320.int_5)
                        {
                            m += 2 * num9;
                        }
                        num9 <<= 1;
                        if (num4 == 0)
                        {
                            num3++;
                            num4 = Class320.int_7;
                        }
                        num4--;
                        num5 = (int)this.byte_2[num3];
                        num6 = this.int_18[num5];
                        for (k = this.method_7(num6); k > this.int_15[num5][num6]; k = (k << 1 | num7))
                        {
                            num6++;
                            while (this.int_11 < 1)
                            {
                                this.method_6();
                            }
                            num7 = (this.int_10 >> this.int_11 - 1 & 1);
                            this.int_11--;
                        }
                        num8 = this.int_17[num5][k - this.int_16[num5][num6]];
                    }while (num8 == Class320.int_4 || num8 == Class320.int_5);
                    m++;
                    byte b2 = this.byte_0[(int)array[0]];
                    this.int_14[(int)b2] += m;
                    while (m > 0)
                    {
                        this.int_7++;
                        this.byte_4[this.int_7] = b2;
                        m--;
                    }
                    if (this.int_7 >= num)
                    {
                        Stream1.smethod_1();
                    }
                }
                return;
            }
            throw new BZip2Exception("Bzip data error");
        }
Ejemplo n.º 3
0
        // Token: 0x060018E5 RID: 6373 RVA: 0x000439FC File Offset: 0x00041BFC
        private void method_11()
        {
            char[][] array = new char[Class320.int_6][];
            for (int i = 0; i < Class320.int_6; i++)
            {
                array[i] = new char[Class320.int_2];
            }
            bool[] array2 = new bool[16];
            for (int j = 0; j < 16; j++)
            {
                array2[j] = (this.method_7(1) == 1);
            }
            for (int k = 0; k < 16; k++)
            {
                if (array2[k])
                {
                    for (int l = 0; l < 16; l++)
                    {
                        this.bool_1[k * 16 + l] = (this.method_7(1) == 1);
                    }
                }
                else
                {
                    for (int m = 0; m < 16; m++)
                    {
                        this.bool_1[k * 16 + m] = false;
                    }
                }
            }
            this.method_0();
            int num  = this.int_12 + 2;
            int num2 = this.method_7(3);
            int num3 = this.method_7(15);

            for (int n = 0; n < num3; n++)
            {
                int num4 = 0;
                while (this.method_7(1) == 1)
                {
                    num4++;
                }
                this.byte_3[n] = (byte)num4;
            }
            byte[] array3 = new byte[Class320.int_6];
            for (int num5 = 0; num5 < num2; num5++)
            {
                array3[num5] = (byte)num5;
            }
            for (int num6 = 0; num6 < num3; num6++)
            {
                int  num7 = (int)this.byte_3[num6];
                byte b    = array3[num7];
                while (num7 > 0)
                {
                    array3[num7] = array3[num7 - 1];
                    num7--;
                }
                array3[0]         = b;
                this.byte_2[num6] = b;
            }
            for (int num8 = 0; num8 < num2; num8++)
            {
                int num9 = this.method_7(5);
                for (int num10 = 0; num10 < num; num10++)
                {
                    while (this.method_7(1) == 1)
                    {
                        if (this.method_7(1) == 0)
                        {
                            num9++;
                        }
                        else
                        {
                            num9--;
                        }
                    }
                    array[num8][num10] = (char)num9;
                }
            }
            for (int num11 = 0; num11 < num2; num11++)
            {
                int num12 = 32;
                int num13 = 0;
                for (int num14 = 0; num14 < num; num14++)
                {
                    num13 = Math.Max(num13, (int)array[num11][num14]);
                    num12 = Math.Min(num12, (int)array[num11][num14]);
                }
                Stream1.smethod_4(this.int_15[num11], this.int_16[num11], this.int_17[num11], array[num11], num12, num13, num);
                this.int_18[num11] = num12;
            }
        }