/******************************************************************** * * bitbuffer.h - Utility for extracting bits from a buffer * * Copyright 1997-2002 TeraLogic, Inc. * All Rights Reserved * * bitBufferCreate: Creates a bitBuffer object from the specified * byte buffer. * (O) instance: Returns the bitBuffer instance. * (I) buffer: The byte buffer. * (I) bufSize: Size of the byte buffer. * * bitBufferDestroy: Destroys a bitBuffer object. * (I) instance: The bitBuffer instance. * * bitBufferGetBits: Extracts the specified number of bits from the * bitBuffer. * (I) instance: The bitBuffer instance. * (I) numberOfBits: Number of bits to be extracted. * * bitBufferCheckError:Checks the error state of the bitBuffer. Returns * "TRUE" if the bitBuffer is in an error state. * (I) instance: The bitBuffer instance. * * _Id: bitbuffer.h,v 1.2 2002/06/13 18:32:24 tvogt Exp ********************************************************************/ #ifndef _bitbuffer_h #define _bitbuffer_h #ifdef __cplusplus extern "C" { #endif /*typedef struct bitBuffer bitBuffer_t, *bitBufferPtr_t;*/ typedef struct bitBuffer bitBuffer_t; typedef struct bitBuffer * bitBufferPtr_t; /* API */ DHL_RESULT bitBufferCreate ( bitBufferPtr_t *instance, DS_U8 *buffer, DS_U32 bufSize); DHL_RESULT bitBufferDestroy ( bitBufferPtr_t instance); DS_U32 bitBufferGetBits (bitBufferPtr_t instance, DS_U8 numberOfBits); void bitBufferSkipBits (bitBufferPtr_t instance, DS_U16 numberOfBits); DS_U8* bitBufferGetBytePointer (bitBufferPtr_t instance); DS_BOOL bitBufferCheckError (bitBufferPtr_t instance); #ifdef __cplusplus } #endif #endif /* _bitbuffer_h */