src/ICSharpCode.SharpZipLib/Checksum/BZip2Crc.cs [109:141]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - public void Update(byte[] buffer) { if (buffer == null) { throw new ArgumentNullException(nameof(buffer)); } Update(buffer, 0, buffer.Length); } /// /// Update CRC data checksum based on a portion of a block of data /// /// /// The chunk of data to add /// public void Update(ArraySegment segment) { Update(segment.Array, segment.Offset, segment.Count); } /// /// Internal helper function for updating a block of data using slicing. /// /// The array containing the data to add /// Range start for (inclusive) /// The number of bytes to checksum starting from private void Update(byte[] data, int offset, int count) { int remainder = count % CrcUtilities.SlicingDegree; int end = offset + count - remainder; while (offset != end) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - src/ICSharpCode.SharpZipLib/Checksum/Crc32.cs [111:143]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - public void Update(byte[] buffer) { if (buffer == null) { throw new ArgumentNullException(nameof(buffer)); } Update(buffer, 0, buffer.Length); } /// /// Update CRC data checksum based on a portion of a block of data /// /// /// The chunk of data to add /// public void Update(ArraySegment segment) { Update(segment.Array, segment.Offset, segment.Count); } /// /// Internal helper function for updating a block of data using slicing. /// /// The array containing the data to add /// Range start for (inclusive) /// The number of bytes to checksum starting from private void Update(byte[] data, int offset, int count) { int remainder = count % CrcUtilities.SlicingDegree; int end = offset + count - remainder; while (offset != end) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -