MySQL  8.0.23
Source Code Documentation
my_checksum.h File Reference
#include <cassert>
#include <cstdint>
#include <limits>
#include <type_traits>
#include <zlib.h>
#include "my_compiler.h"
#include "my_config.h"

Go to the source code of this file.

Namespaces

 mycrc32
 

Typedefs

using ha_checksum = std::uint32_t
 

Functions

template<class I >
std::uint32_t mycrc32::IntegerCrc32 (std::uint32_t crc, I i)
 
template<class PT >
std::uint32_t mycrc32::PunnedCrc32 (std::uint32_t crc, const unsigned char *buf, size_t len)
 
ha_checksum my_checksum (ha_checksum crc, const unsigned char *pos, size_t length)
 Calculate a CRC32 checksum for a memoryblock. More...
 

Detailed Description

Abstraction functions over zlib/intrinsics.

Typedef Documentation

◆ ha_checksum

using ha_checksum = std::uint32_t

Function Documentation

◆ my_checksum()

ha_checksum my_checksum ( ha_checksum  crc,
const unsigned char *  pos,
size_t  length 
)
inline

Calculate a CRC32 checksum for a memoryblock.

Parameters
crcStart value for crc.
posPointer to memory block.
lengthLength of the block.
Returns
Updated checksum.