Spanify Crc32

This commit is contained in:
Jason Nelson 2024-03-15 10:17:15 -07:00 committed by BobLd
parent 77705bbd67
commit dca11253a0

View File

@ -1,5 +1,6 @@
namespace UglyToad.PdfPig.Images.Png namespace UglyToad.PdfPig.Images.Png
{ {
using System;
using System.Collections.Generic; using System.Collections.Generic;
/// <summary> /// <summary>
@ -36,7 +37,7 @@
/// <summary> /// <summary>
/// Calculate the CRC32 for data. /// Calculate the CRC32 for data.
/// </summary> /// </summary>
public static uint Calculate(byte[] data) public static uint Calculate(ReadOnlySpan<byte> data)
{ {
var crc32 = uint.MaxValue; var crc32 = uint.MaxValue;
for (var i = 0; i < data.Length; i++) for (var i = 0; i < data.Length; i++)