1 #ifndef _SCC_ENCODE_ADLER32_H
2 #define _SCC_ENCODE_ADLER32_H
6 namespace scc::encode {
43 Adler32(
const void* loc,
int len) : m_val(1), m_sz(0)
49 operator uint32_t()
const {
return m_val; }
50 uint32_t val()
const {
return m_val; }
72 uint32_t
reset(
const void* loc,
int len)
84 uint32_t
update(
const void*,
int);
93 uint32_t combine(
const Adler32&);
105 uint32_t
rotate(
unsigned char,
unsigned char);
106 uint32_t
rotate(
char xrem,
char xadd) {
107 return rotate(
static_cast<unsigned char>(xrem),
static_cast<unsigned char>(xadd));
Adler-32 checksum allowing rolling calculation.
Adler32(const void *loc, int len)
Construct with initial value.
Adler32()
Construct with initialized value.
uint32_t reset(const void *loc, int len)
Reset the checksum, and update with initial value.
uint32_t rotate(unsigned char, unsigned char)
Update the checksum with next byte.
uint32_t reset()
Reset the checksum.
uint32_t update(const void *, int)
Update the checksum with buffer contents.
int size()
Size of the current window.