ebml/EbmlCrc32.h File Reference

#include <cassert>
#include "EbmlTypes.h"
#include "EbmlBinary.h"
Include dependency graph for EbmlCrc32.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define CRC32_INDEX(c)   (c & 0xff)
#define CRC32_SHIFTED(c)   (c >> 8)

Enumerations

enum  { DIGESTSIZE = 4 }

Functions

 EbmlCrc32 (const EbmlCrc32 &ElementToClone)
virtual bool ValidateSize () const
filepos_t RenderData (IOCallback &output, bool bForceRender, bool bWithDefault=false)
filepos_t ReadData (IOCallback &input, ScopeMode ReadFully=SCOPE_ALL_DATA)
bool IsDefaultValue () const
void AddElementCRC32 (EbmlElement &ElementToCRC)
bool CheckElementCRC32 (EbmlElement &ElementToCRC)
void FillCRC32 (const binary *input, uint32 length)
void Update (const binary *input, uint32 length)
void Finalize ()
uint32 GetCrc32 () const
void ForceCrc32 (uint32 NewValue)
void ResetCRC ()
void UpdateByte (binary b)
template<class T >
unsigned int GetAlignment (T *dummy=NULL)
template<class T >
bool IsPowerOf2 (T n)
template<class T1 , class T2 >
T2 ModPowerOf2 (T1 a, T2 b)
bool IsAlignedOn (const void *p, unsigned int alignment)
template<class T >
bool IsAligned (const void *p, T *dummy=NULL)

Variables

START_LIBEBML_NAMESPACE const
uint32 
CRC32_NEGL = 0xffffffffL
uint32 m_crc
uint32 m_crc_final

Detailed Description

Version:
$Id: EbmlCrc32.h 270 2010-05-25 12:02:30Z robux4 $
Author:
Steve Lhomme <robux4 @ users.sf.net>
Jory Stone <jcsston @ toughguy.net>

Enumeration Type Documentation

anonymous enum

CRC Checksum Calculation


Function Documentation

void EbmlCrc32::FillCRC32 ( const binary *  input,
uint32  length 
)

Calls Update() and Finalize(), use to create a CRC32 in one go

void EbmlCrc32::Finalize (  ) 

Use this with Update() to Finalize() or Complete the CRC32

uint32 GetCrc32 (  )  const

Returns a uint32 that has the value of the CRC32

void EbmlCrc32::Update ( const binary *  input,
uint32  length 
)

Add data to the CRC table, in other words process some data bit by bit

 All Classes Files Functions Variables Enumerations Enumerator
Generated on Tue Jun 8 11:06:00 2010 for libebml by  doxygen 1.6.3