Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Crc32Helper.cs
Go to the documentation of this file.
2
4
5internal static class Crc32Helper
6{
7 public unsafe static uint UpdateCrc32(uint crc32, byte[] buffer, int offset, int length)
8 {
9 fixed (byte* buffer2 = &buffer[offset])
10 {
11 return global::Interop.zlib.crc32(crc32, buffer2, length);
12 }
13 }
14
15 public unsafe static uint UpdateCrc32(uint crc32, ReadOnlySpan<byte> buffer)
16 {
17 fixed (byte* buffer2 = &MemoryMarshal.GetReference(buffer))
18 {
19 return global::Interop.zlib.crc32(crc32, buffer2, buffer.Length);
20 }
21 }
22}
static unsafe uint UpdateCrc32(uint crc32, ReadOnlySpan< byte > buffer)
static unsafe uint UpdateCrc32(uint crc32, byte[] buffer, int offset, int length)
Definition Crc32Helper.cs:7