Epok Engine

PSYQO SDK

psyqo::adler32

Function · 1 overload

Declarations are extracted from the pinned headers. Examples and general guidance are generated sketches, not verified complete programs; consult the linked source and guides for the actual contract.

Function

Computes the adler32 checksum of a buffer.

Belongs to
psyqo
Header
adler32.hh
Overloads
1

Declaration

Declaration
uint32_t adler32(uint8_t* buffer, unsigned length, uint32_t sum = 1)

Computes the adler32 checksum of a buffer.

ParameterTypeMeaning
bufferuint8_t *The buffer to checksum.
lengthunsigned intNot documented; consult the linked header.
sumuint32_tThe previous sum to continue the checksum for.

Returns: uint32_t — The adler32 checksum of the buffer.

Example sketch

C++ example
#include "psyqo/adler32.hh"

// Assume these named values have been initialized with valid data:
// uint8_t * buffer
// unsigned int length
// uint32_t sum

auto result = psyqo::adler32(buffer, length, sum);

Trade-offs and warnings

Consult the linked header for this operation’s ownership, lifetime and failure behavior.

Declared in https://github.com/epokengine/nugget/blob/4a01183295182b8e7702c908e1efaaa8f4538ffd/psyqo/adler32.hh:53

Related members