Пример #1
0
        public override void Write(byte[] buffer, int offset, int count)
        {
            int num = offset + count;

            for (int index = offset; index < num; ++index)
            {
                this.ushort_0 = Stream1.smethod_2(this.ushort_0, buffer[index]);
            }
            this.stream_0.Write(buffer, offset, count);
        }
Пример #2
0
        public override int Read(byte[] buffer, int offset, int count)
        {
            int num1 = this.stream_0.Read(buffer, offset, count);
            int num2 = offset + count;

            for (int index = offset; index < num2; ++index)
            {
                this.ushort_0 = Stream1.smethod_2(this.ushort_0, buffer[index]);
            }
            return(num1);
        }
Пример #3
0
        public static ushort smethod_1(ushort initialCrc, byte[] data, long offset, long length)
        {
            ushort crc   = initialCrc;
            int    index = (int)offset;

            while (length-- > 0L)
            {
                crc = Stream1.smethod_2(crc, data[index]);
                ++index;
            }
            return(crc);
        }