Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

source/pack.h File Reference

interface to the routines to pack and unpack bitfield arrays More...

#include <appconfig.h>

Go to the source code of this file.

Functions

void PackBits (void *src, void *dest, UInt8 nbits, UInt32 count) PACK_SECTION
 pack from src->dest count of the nbits-lowest order bits

void UnpackBits (void *src, void *dest, UInt8 nbits, UInt32 count) PACK_SECTION
 unpack from src->dest the number of bits into the count specified


Detailed Description

interface to the routines to pack and unpack bitfield arrays

Definition in file pack.h.


Function Documentation

void PackBits void *    src,
void *    dest,
UInt8    nbits,
UInt32    count
 

pack from src->dest count of the nbits-lowest order bits

Parameters:
src  source memory
dest  destination memory
nbits  number of bits to pack
count  count of entries to pack

Definition at line 23 of file pack.c.

References UInt32, and UInt8.

Referenced by WriteCityRecord().

void UnpackBits void *    src,
void *    dest,
UInt8    nbits,
UInt32    count
 

unpack from src->dest the number of bits into the count specified

Parameters:
src  source memory to unpack from
dest  dest memory to unpack into
nbits  number of bits in this element
count  number of elements
Process: shift the current value right by offset bits and and with the mask This works providing we have more bits left in the field than bits we want to shift by.

Definition at line 63 of file pack.c.

References UInt32, and UInt8.

Referenced by ReadCityRecord().


Generated on Mon Aug 30 19:44:18 2004 for pocketcity by doxygen1.2.18