bi_reverse() static private method

static private bi_reverse ( int code, int len ) : int
code int
len int
return int
Ejemplo n.º 1
0
        internal static void gen_codes(short[] tree, int max_code, short[] bl_count)
        {
            short[] numArray = new short[InternalConstants.MAX_BITS + 1];
            short   num      = 0;

            for (int index = 1; index <= InternalConstants.MAX_BITS; ++index)
            {
                numArray[index] = num = (short)((int)num + (int)bl_count[index - 1] << 1);
            }
            for (int index = 0; index <= max_code; ++index)
            {
                int len = (int)tree[index * 2 + 1];
                if (len != 0)
                {
                    tree[index * 2] = (short)Tree.bi_reverse((int)numArray[len]++, len);
                }
            }
        }
Ejemplo n.º 2
0
        internal static void gen_codes(short[] tree, int max_code, short[] bl_count)
        {
            short[] array = new short[InternalConstants.MAX_BITS + 1];
            short   num   = 0;

            for (int i = 1; i <= InternalConstants.MAX_BITS; i++)
            {
                num = (array[i] = (short)(num + bl_count[i - 1] << 1));
            }
            for (int j = 0; j <= max_code; j++)
            {
                int num2 = tree[j * 2 + 1];
                if (num2 != 0)
                {
                    tree[j * 2] = (short)Tree.bi_reverse(array[num2]++, num2);
                }
            }
        }
Ejemplo n.º 3
0
        // Token: 0x060006F5 RID: 1781 RVA: 0x00033244 File Offset: 0x00031444
        internal static void gen_codes(short[] tree, int max_code, short[] bl_count)
        {
            short[] array = new short[InternalConstants.MAX_BITS + 1];
            short   num   = 0;

            for (int i = 1; i <= InternalConstants.MAX_BITS; i++)
            {
                num = (array[i] = (short)(num + bl_count[i - 1] << 1));
            }
            for (int j = 0; j <= max_code; j++)
            {
                int num2 = (int)tree[j * 2 + 1];
                if (num2 != 0)
                {
                    int     num3   = j * 2;
                    short[] array2 = array;
                    int     num4   = num2;
                    short   code;
                    array2[num4] = (code = array2[num4]) + 1;
                    tree[num3]   = (short)Tree.bi_reverse((int)code, num2);
                }
            }
        }
Ejemplo n.º 4
0
        // Token: 0x06000D16 RID: 3350 RVA: 0x0004BA4C File Offset: 0x00049C4C
        internal static void gen_codes(short[] tree, int max_code, short[] bl_count)
        {
            short[] array = new short[InternalConstants.MAX_BITS + 1];
            short   num   = 0;

            for (int i = 1; i <= InternalConstants.MAX_BITS; i++)
            {
                num = (array[i] = (short)(num + bl_count[i - 1] << 1));
            }
            for (int j = 0; j <= max_code; j++)
            {
                int num2 = (int)tree[j * 2 + 1];
                if (num2 != 0)
                {
                    int     arg_66_1     = j * 2;
                    short[] expr_4B_cp_0 = array;
                    int     expr_4B_cp_1 = num2;
                    short   code;
                    expr_4B_cp_0[expr_4B_cp_1] = (code = expr_4B_cp_0[expr_4B_cp_1]) + 1;
                    tree[arg_66_1]             = (short)Tree.bi_reverse((int)code, num2);
                }
            }
        }