UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
CRC.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6
7namespace uLang
8{
9
13class CCRC16
14{
15public:
16
21 {
22 const uint16_t* Table = _Table;
23 uint16_t CRC = PrevCRC;
24 while (Begin < End)
25 {
26 CRC = (CRC >> 8) ^ Table[(CRC ^ *Begin++) & 0xff];
27 }
28 return CRC;
29 }
30
31private:
32
33 ULANGCORE_API static const uint16_t* _Table;
34};
35
39class CCRC32
40{
41public:
42
47 {
48 const uint32_t* Table = _Table;
49 uint32_t CRC = PrevCRC;
50 while (Begin < End)
51 {
52 CRC = (CRC >> 8) ^ Table[(CRC ^ *Begin++) & 0xff];
53 }
54 return CRC;
55 }
56
57private:
58
59 ULANGCORE_API static const uint32_t* _Table;
60};
61
64class CCRC64
65{
66public:
67
71 static uint64_t GenerateSlow(const uint8_t* Begin, const uint8_t* End, uint64_t PrevCRC = 0);
72};
73
74} // namespace uLang
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define ULANG_FORCEINLINE
Definition Common.h:188
Definition CRC.h:14
static ULANG_FORCEINLINE uint16_t Generate(const uint8_t *Begin, const uint8_t *End, uint16_t PrevCRC=0)
Definition CRC.h:20
Definition CRC.h:40
static ULANG_FORCEINLINE uint32_t Generate(const uint8_t *Begin, const uint8_t *End, uint32_t PrevCRC=0)
Definition CRC.h:46
Definition CRC.h:65
static uint64_t GenerateSlow(const uint8_t *Begin, const uint8_t *End, uint64_t PrevCRC=0)
Definition CRC.cpp:90
Definition VVMEngineEnvironment.h:23