예제 #1
0
파일: Class955.cs 프로젝트: 15831944/WW
        private unsafe bool FindMatch(out long matchOffset, out long matchLength)
        {
            matchOffset = 0L;
            matchLength = 0L;
            uint num1 = Class955.smethod_0(this.pByte_2);
            int  num2;

            for (num2 = 0; num2 < 4; ++num2)
            {
                byte *matchPtr = this.pByte_0[(long)num1 + (long)num2];
                if ((IntPtr)matchPtr == IntPtr.Zero || this.IsMatch(matchPtr, ref matchOffset, ref matchLength))
                {
                    break;
                }
            }
            if (matchLength == 0L && num2 < 4)
            {
                this.pByte_0[(long)num1 + (long)num2] = this.pByte_2;
            }
            else
            {
                this.pByte_0[(IntPtr)(num1 + 3U)] = this.pByte_0[(IntPtr)(num1 + 2U)];
                this.pByte_0[(IntPtr)(num1 + 2U)] = this.pByte_0[(IntPtr)(num1 + 1U)];
                this.pByte_0[(IntPtr)(num1 + 1U)] = this.pByte_0[(IntPtr)num1];
                this.pByte_0[(IntPtr)num1]        = this.pByte_2;
            }
            return(matchLength != 0L);
        }
예제 #2
0
파일: Class955.cs 프로젝트: 15831944/WW
        public unsafe void method_1(byte[] sourceData, int index, int length, Stream targetStream)
        {
            this.byte_0   = sourceData;
            this.stream_0 = targetStream;
            this.bool_0   = true;
            fixed(byte *numPtr = sourceData)
            {
                this.pByte_1 = numPtr + index;
                this.pByte_3 = this.pByte_1 + length;
                this.pByte_2 = this.pByte_1;
                this.pByte_0[(IntPtr)Class955.smethod_0(this.pByte_2)] = this.pByte_2;
                uint num1 = 1;

                ++this.pByte_2;
                while (this.pByte_2 <= this.pByte_3 - 3)
                {
                    long matchOffset;
                    long matchLength;
                    if (!this.FindMatch(out matchOffset, out matchLength))
                    {
                        ++this.pByte_2;
                        ++num1;
                    }
                    else
                    {
                        if (num1 > 0U)
                        {
                            this.method_2(num1);
                            this.method_4(this.pByte_2 - (int)num1, num1);
                        }
                        this.method_3((uint)matchOffset, (uint)matchLength, num1);
                        this.pByte_2 += matchLength;
                        num1          = 0U;
                    }
                }
                uint num2 = num1 + (uint)(this.pByte_3 - this.pByte_2);

                if (num2 > 0U)
                {
                    this.method_2(num2);
                    this.method_4(this.pByte_3 - (int)num2, num2);
                }
                this.method_38();
            }
        }