Esempio n. 1
0
 private void method_7(bool bool2)
 {
     method_1();
     if ((_int1 & 8) != 0)
     {
         method_6();
     }
     _long1 = 0L;
     if (bool2 && (_class1920.vmethod_0() & 4294967295L) != _class1930.method_25() &&
         _class1930.method_25() != -1L)
     {
         throw new ZipException("CRC mismatch");
     }
     _class1920.vmethod_1();
     if (_int0 == 8)
     {
         Class1960.method_0();
     }
     _class1930 = null;
 }
Esempio n. 2
0
        private int method_12(byte[] byte0, int int2, int int3)
        {
            if (_class1920 == null)
            {
                throw new InvalidOperationException("Closed");
            }
            if (_class1930 == null || int3 <= 0)
            {
                return(0);
            }
            if (int2 + int3 > byte0.Length)
            {
                throw new ArgumentException("Offset + count exceeds buffer size");
            }
            var flag = false;
            var num  = _int0;

            if (num != 0)
            {
                if (num == 8)
                {
                    int3 = base.Read(byte0, int2, int3);
                    if (int3 <= 0)
                    {
                        if (!Class1960.method_10())
                        {
                            throw new ZipException("Inflater not finished!");
                        }
                        Class2010.method_2(Class1960.method_13());
                        if ((_int1 & 8) == 0 && (Class1960.method_12() != Long0 || Class1960.method_11() != _long1))
                        {
                            throw new ZipException(string.Concat("Size mismatch: ", Long0, ";", _long1, " <-> ",
                                                                 Class1960.method_12(), ";", Class1960.method_11()));
                        }
                        Class1960.method_0();
                        flag = true;
                    }
                }
            }
            else
            {
                if (int3 > Long0 && Long0 >= 0L)
                {
                    int3 = (int)Long0;
                }
                if (int3 > 0)
                {
                    int3 = Class2010.method_7(byte0, int2, int3);
                    if (int3 > 0)
                    {
                        Long0  -= int3;
                        _long1 -= int3;
                    }
                }
                if (Long0 == 0L)
                {
                    flag = true;
                }
                else if (int3 < 0)
                {
                    throw new ZipException("EOF in stored block");
                }
            }
            if (int3 > 0)
            {
                _class1920.vmethod_3(byte0, int2, int3);
            }
            if (flag)
            {
                method_7(true);
            }
            return(int3);
        }