Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Crc32Helper.cs
Go to the documentation of this file.
1
using
System.Runtime.InteropServices
;
2
3
namespace
System.IO.Compression
;
4
5
internal
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
}
System.IO.Compression.Crc32Helper.UpdateCrc32
static unsafe uint UpdateCrc32(uint crc32, ReadOnlySpan< byte > buffer)
Definition
Crc32Helper.cs:15
System.IO.Compression.Crc32Helper.UpdateCrc32
static unsafe uint UpdateCrc32(uint crc32, byte[] buffer, int offset, int length)
Definition
Crc32Helper.cs:7
System.IO.Compression.Crc32Helper
Definition
Crc32Helper.cs:6
System.Runtime.InteropServices.MemoryMarshal
Definition
MemoryMarshal.cs:11
System.IO.Compression
Definition
BrotliDecoder.cs:5
System.Runtime.InteropServices
Definition
SequenceMarshal.cs:4
System.ExceptionArgument.length
@ length
System.ExceptionArgument.offset
@ offset
System.ExceptionArgument.buffer
@ buffer
System.ReadOnlySpan
Definition
ReadOnlySpan.cs:14
source
System.IO.Compression
System.IO.Compression
Crc32Helper.cs
Generated by
1.10.0