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; }
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; }