Exemplo n.º 1
0
        public void UpdateWithBytesRead(byte[] buffer, int offset, int copied)
        {
            actualCrc32 = Crc32Helper.UpdateCrc32(actualCrc32, buffer, offset, copied);

            long n = actualStreamSizeModulo + (uint)copied;

            if (n >= GZipConstants.FileLengthModulo)
            {
                n %= GZipConstants.FileLengthModulo;
            }
            actualStreamSizeModulo = n;
        }
Exemplo n.º 2
0
        public void UpdateWithBytesRead(byte[] buffer, int offset, int bytesToCopy)
        {
            _crc32 = Crc32Helper.UpdateCrc32(_crc32, buffer, offset, bytesToCopy);

            long n = _inputStreamSizeModulo + (uint)bytesToCopy;

            if (n >= GZipConstants.FileLengthModulo)
            {
                n %= GZipConstants.FileLengthModulo;
            }
            _inputStreamSizeModulo = n;
        }