CrystalSpace

Public API Reference

CS::Utility::Checksum::Adler32 Class Reference

Compute Adler-32 checksum for some data. More...

#include <csutil/checksum.h>

List of all members.

Public Member Functions

void Append (const uint8 *data, size_t size)
 Feed in more data to checksum.
uint32 Finish ()
 "Finish" checksum computation and return checksum over all data.
 operator uint32 () const
 Return current checksum. For function-style use.



 Adler32 (uint32 prevCheckSum, iDataBuffer *data)
 Continue computing Adler-32 checksum for given data buffer.
 Adler32 (uint32 prevCheckSum, const void *data, size_t size)
 Continue computing Adler-32 checksum for given data buffer.
 Adler32 (iDataBuffer *data)
 Continue computing Adler-32 checksum for given data buffer.
 Adler32 (const void *data, size_t size)
 Compute Adler-32 checksum for given data buffer.

Detailed Description

Compute Adler-32 checksum for some data.

This class can be used in two ways, function-style (for checksumming a single block of data) and as an instance (to checksum data in multiple chunks).

Example for function-style use:

 uint32 check = CS::Utility::Checksum::Adler32 (data, dataSize);

Example for use as an instance:

 CS::Utility::Checksum::Adler32 computeSum;
 computeSum.Append (dataPart1, dataPart1Size);
 // ... 
 computeSum.Append (dataPart2, dataPart2Size);
 uint32 checksum = computeSum.Finish();

Definition at line 52 of file checksum.h.


Constructor & Destructor Documentation

CS::Utility::Checksum::Adler32::Adler32 ( const void *  data,
size_t  size 
) [inline]

Compute Adler-32 checksum for given data buffer.

Definition at line 65 of file checksum.h.

CS::Utility::Checksum::Adler32::Adler32 ( iDataBuffer data  )  [inline]

Continue computing Adler-32 checksum for given data buffer.

Remarks:
It's recommended to use the Append() method to compute the checksum over multiple chunks of data.

Definition at line 66 of file checksum.h.

CS::Utility::Checksum::Adler32::Adler32 ( uint32  prevCheckSum,
const void *  data,
size_t  size 
) [inline]

Continue computing Adler-32 checksum for given data buffer.

Remarks:
It's recommended to use the Append() method to compute the checksum over multiple chunks of data.

Definition at line 76 of file checksum.h.

CS::Utility::Checksum::Adler32::Adler32 ( uint32  prevCheckSum,
iDataBuffer data 
) [inline]

Continue computing Adler-32 checksum for given data buffer.

Remarks:
It's recommended to use the Append() method to compute the checksum over multiple chunks of data.

Definition at line 78 of file checksum.h.


Member Function Documentation

void CS::Utility::Checksum::Adler32::Append ( const uint8 *  data,
size_t  size 
) [inline]

Feed in more data to checksum.

Definition at line 83 of file checksum.h.

uint32 CS::Utility::Checksum::Adler32::Finish (  )  [inline]

"Finish" checksum computation and return checksum over all data.

Definition at line 86 of file checksum.h.

CS::Utility::Checksum::Adler32::operator uint32 (  )  const [inline]

Return current checksum. For function-style use.

Definition at line 90 of file checksum.h.


The documentation for this class was generated from the following file:

Generated for Crystal Space 2.1 by doxygen 1.6.1