コード例 #1
0
 public void method_6(int int1)
 {
     Class1940.method_7(int1);
     _int0 = int1;
 }
コード例 #2
0
        public void method_10(Class193 class1931)
        {
            if (class1931 == null)
            {
                throw new ArgumentNullException("entry");
            }
            if (_arrayList0 == null)
            {
                throw new InvalidOperationException("ZipOutputStream was finished");
            }
            if (_class1930 != null)
            {
                method_11();
            }
            if (_arrayList0.Count == 2147483647)
            {
                throw new ZipException("Too many entries for Zip file");
            }
            var @enum = class1931.method_27();
            var int_  = _int0;

            class1931.method_5(class1931.method_4() & 2048);
            _bool2 = false;
            var flag = true;

            if (@enum == Enum31.Const0)
            {
                class1931.method_5(class1931.method_4() & -9);
                if (class1931.method_23() >= 0L)
                {
                    if (class1931.method_21() < 0L)
                    {
                        class1931.method_22(class1931.method_23());
                    }
                    else if (class1931.method_21() != class1931.method_23())
                    {
                        throw new ZipException("Method STORED, but compressed size != size");
                    }
                }
                else if (class1931.method_21() >= 0L)
                {
                    class1931.method_24(class1931.method_21());
                }
                if (class1931.method_21() < 0L || class1931.method_25() < 0L)
                {
                    if (method_0())
                    {
                        flag = false;
                    }
                    else
                    {
                        @enum = Enum31.Const1;
                        int_  = 0;
                    }
                }
            }
            if (@enum == Enum31.Const1)
            {
                if (class1931.method_21() == 0L)
                {
                    class1931.method_24(class1931.method_21());
                    class1931.method_26(0L);
                    @enum = Enum31.Const0;
                }
                else if (class1931.method_23() < 0L || class1931.method_21() < 0L || class1931.method_25() < 0L)
                {
                    flag = false;
                }
            }
            if (!flag)
            {
                if (!method_0())
                {
                    class1931.method_5(class1931.method_4() | 8);
                }
                else
                {
                    _bool2 = true;
                }
            }
            if (method_1() != null)
            {
                class1931.method_1(true);
                if (class1931.method_25() < 0L)
                {
                    class1931.method_5(class1931.method_4() | 8);
                }
            }
            class1931.method_7(_long1);
            class1931.method_28(@enum);
            _enum310 = @enum;
            _long3   = -1L;
            if (_enum300 == Enum30.Const1 || (class1931.method_21() < 0L && _enum300 == Enum30.Const2))
            {
                class1931.method_13();
            }
            method_8(67324752);
            method_7(class1931.method_11());
            method_7(class1931.method_4());
            method_7((byte)@enum);
            method_8((int)class1931.method_17());
            if (flag)
            {
                method_8((int)class1931.method_25());
                if (class1931.method_15())
                {
                    method_8(-1);
                    method_8(-1);
                }
                else
                {
                    method_8(class1931.method_0() ? ((int)class1931.method_23() + 12) : ((int)class1931.method_23()));
                    method_8((int)class1931.method_21());
                }
            }
            else
            {
                if (_bool2)
                {
                    _long2 = Stream0.Position;
                }
                method_8(0);
                if (_bool2)
                {
                    _long3 = Stream0.Position;
                }
                if (class1931.method_15() && _bool2)
                {
                    method_8(-1);
                    method_8(-1);
                }
                else
                {
                    method_8(0);
                    method_8(0);
                }
            }
            var array = Class186.smethod_4(class1931.method_4(), class1931.method_20());

            if (array.Length > 65535)
            {
                throw new ZipException("Entry name too long.");
            }
            var @class = new Class202(class1931.method_29());

            if (class1931.method_15() && (flag || _bool2))
            {
                @class.method_8();
                if (flag)
                {
                    @class.method_12(class1931.method_21());
                    @class.method_12(class1931.method_23());
                }
                else
                {
                    @class.method_12(-1L);
                    @class.method_12(-1L);
                }
                @class.method_9(1);
                if ([email protected]_6(1))
                {
                    throw new ZipException("Internal error cant find extra data");
                }
                if (_bool2)
                {
                    _long3 = @class.method_4();
                }
            }
            else
            {
                @class.method_13(1);
            }
            var array2 = @class.method_0();

            method_7(array.Length);
            method_7(array2.Length);
            if (array.Length > 0)
            {
                Stream0.Write(array, 0, array.Length);
            }
            if (class1931.method_15() && _bool2)
            {
                _long3 += Stream0.Position;
            }
            if (array2.Length > 0)
            {
                Stream0.Write(array2, 0, array2.Length);
            }
            _long1    += 30 + array.Length + array2.Length;
            _class1930 = class1931;
            _class1920.vmethod_1();
            if (@enum == Enum31.Const1)
            {
                Class1940.method_0();
                Class1940.method_7(int_);
            }
            _long0 = 0L;
            if (class1931.method_0())
            {
                if (class1931.method_25() < 0L)
                {
                    method_12(class1931.method_17() << 16);
                    return;
                }
                method_12(class1931.method_25());
            }
        }
コード例 #3
0
        public void method_11()
        {
            if (_class1930 == null)
            {
                throw new InvalidOperationException("No open entry");
            }
            if (_enum310 == Enum31.Const1)
            {
                base.vmethod_0();
            }
            var num = (_enum310 == Enum31.Const1) ? Class1940.method_1() : _long0;

            if (_class1930.method_21() < 0L)
            {
                _class1930.method_22(_long0);
            }
            else if (_class1930.method_21() != _long0)
            {
                throw new ZipException(string.Concat("size was ", _long0, ", but I expected ", _class1930.method_21()));
            }
            if (_class1930.method_23() < 0L)
            {
                _class1930.method_24(num);
            }
            else if (_class1930.method_23() != num)
            {
                throw new ZipException(string.Concat("compressed size was ", num, ", but I expected ",
                                                     _class1930.method_23()));
            }
            if (_class1930.method_25() < 0L)
            {
                _class1930.method_26(_class1920.vmethod_0());
            }
            else if (_class1930.method_25() != _class1920.vmethod_0())
            {
                throw new ZipException(string.Concat("crc was ", _class1920.vmethod_0(), ", but I expected ",
                                                     _class1930.method_25()));
            }
            _long1 += num;
            if (_class1930.method_0())
            {
                var expr_1E6 = _class1930;
                expr_1E6.method_24(expr_1E6.method_23() + 12L);
            }
            if (_bool2)
            {
                _bool2 = false;
                var position = Stream0.Position;
                Stream0.Seek(_long2, SeekOrigin.Begin);
                method_8((int)_class1930.method_25());
                if (_class1930.method_15())
                {
                    if (_long3 == -1L)
                    {
                        throw new ZipException("Entry requires zip64 but this has been turned off");
                    }
                    Stream0.Seek(_long3, SeekOrigin.Begin);
                    method_9(_class1930.method_21());
                    method_9(_class1930.method_23());
                }
                else
                {
                    method_8((int)_class1930.method_23());
                    method_8((int)_class1930.method_21());
                }
                Stream0.Seek(position, SeekOrigin.Begin);
            }
            if ((_class1930.method_4() & 8) != 0)
            {
                method_8(134695760);
                method_8((int)_class1930.method_25());
                if (_class1930.method_15())
                {
                    method_9(_class1930.method_23());
                    method_9(_class1930.method_21());
                    _long1 += 24L;
                }
                else
                {
                    method_8((int)_class1930.method_23());
                    method_8((int)_class1930.method_21());
                    _long1 += 16L;
                }
            }
            _arrayList0.Add(_class1930);
            _class1930 = null;
        }