Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
crc.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
12
#include "
core/types.h
"
13
14
//------------------------------------------------------------------------------
15
namespace
Util
16
{
17
class
Crc
18
{
19
public
:
21
Crc
();
23
void
Begin
();
25
template
<
typename
sizetype>
void
Compute
(
unsigned
char
* buf, sizetype numBytes);
27
void
End
();
29
unsigned
int
GetResult
()
const
;
30
31
private
:
32
static
const
unsigned
int
Key
= 0x04c11db7;
33
static
const
unsigned
int
NumByteValues
= 256;
34
static
unsigned
int
Table
[
NumByteValues
];
35
static
bool
TableInitialized
;
36
37
bool
inBegin
;
38
bool
resultValid
;
39
unsigned
int
checksum
;
40
};
41
42
//template<> void Crc::Compute(unsigned char* buf, int numBytes);
43
//template<> void Crc::Compute(unsigned char* buf, __int64 numBytes);
44
}
// namespace Util
45
//------------------------------------------------------------------------------
Util::Crc::TableInitialized
static bool TableInitialized
Definition
crc.h:35
Util::Crc::GetResult
unsigned int GetResult() const
get result
Definition
crc.cc:101
Util::Crc::NumByteValues
static const unsigned int NumByteValues
Definition
crc.h:33
Util::Crc::Compute
void Compute(unsigned char *buf, sizetype numBytes)
continue computing checksum
Definition
crc.cc:70
Util::Crc::resultValid
bool resultValid
Definition
crc.h:38
Util::Crc::inBegin
bool inBegin
Definition
crc.h:37
Util::Crc::Begin
void Begin()
begin computing a checksum
Definition
crc.cc:55
Util::Crc::checksum
unsigned int checksum
Definition
crc.h:39
Util::Crc::End
void End()
finish computing the checksum
Definition
crc.cc:88
Util::Crc::Crc
Crc()
constructor
Definition
crc.cc:20
Util::Crc::Key
static const unsigned int Key
Definition
crc.h:32
Util::Crc::Table
static unsigned int Table[NumByteValues]
Definition
crc.h:34
Util
A quad tree designed to return regions of free 2D space.
Definition
String.cs:6
types.h
code
foundation
util
crc.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.