mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-07-15 23:06:56 +08:00
Spanify Crc32
This commit is contained in:
parent
77705bbd67
commit
dca11253a0
@ -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++)
|
||||||
|
Loading…
Reference in New Issue
Block a user