Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Load.hpp File Reference

Go to the source code of this file.

Typedefs

typedef unsigned char TInputPtr

Functions

char LoadChar (unsigned char *&ptr)
unsigned long LoadUInt32 (unsigned char *&ptr)
unsigned long LoadSInt32 (TInputPtr *&ptr, char *isneg)
unsigned char * LoadData (unsigned char *&ptr, unsigned long len)
void LoadDataBlock (TInputPtr *&ptr, unsigned char *dest, unsigned long len)


Typedef Documentation

typedef unsigned char TInputPtr
 

Definition at line 38 of file Load.hpp.


Function Documentation

char LoadChar unsigned char *&    ptr [inline]
 

Definition at line 40 of file Load.hpp.

Referenced by UncompressContainer::LoadChar().

00042 {
00043    return (char)*(ptr++);
00044 }

unsigned char* LoadData unsigned char *&    ptr,
unsigned long    len
[inline]
 

Definition at line 101 of file Load.hpp.

00103 {
00104    ptr+=len;
00105    return ptr-len;
00106 }

void LoadDataBlock TInputPtr *&    ptr,
unsigned char *    dest,
unsigned long    len
[inline]
 

Definition at line 110 of file Load.hpp.

00112 {
00113    while(len--)
00114    {
00115       *dest=*ptr;
00116       ptr++;
00117       dest++;
00118    }
00119 }

unsigned long LoadSInt32 TInputPtr *&    ptr,
char *    isneg
[inline]
 

Definition at line 73 of file Load.hpp.

Referenced by UncompressContainer::LoadSInt32().

00075 {
00076    if(*ptr<128)
00077    {
00078       *isneg=((*ptr & 64) ? 1 : 0);
00079       return (unsigned long)(*(ptr++)&63);
00080    }
00081    else
00082    {
00083       *isneg=((*ptr & 32) ? 1 : 0);
00084 
00085       if(*ptr<192)
00086       {
00087          ptr+=2;
00088          return ((unsigned long)(ptr[-2]&31)<<8)+(unsigned long)ptr[-1];
00089       }
00090       else
00091       {
00092          ptr+=4;
00093          return ((unsigned long)(ptr[-4]&31)<<24)+((unsigned long)ptr[-3]<<16)+
00094                 ((unsigned long)ptr[-2]<<8)+(unsigned long)ptr[-1];
00095       }
00096    }
00097 }

unsigned long LoadUInt32 unsigned char *&    ptr [inline]
 

Definition at line 48 of file Load.hpp.

Referenced by UncompressContainer::LoadUInt32().

00050 {
00051   if(*ptr<128)
00052      return (unsigned)*(ptr++);
00053   else
00054   {
00055      if(*ptr<192)
00056      {
00057         ptr+=2;
00058         return (((unsigned)ptr[-2]-128)<<8)+(unsigned)ptr[-1];
00059      }
00060      else
00061      {
00062         ptr+=4;
00063         return (((unsigned)ptr[-4]-192)<<24)+
00064                (((unsigned)ptr[-3])<<16)+
00065                (((unsigned)ptr[-2])<<8)+
00066                (unsigned)ptr[-1];
00067      }
00068   }
00069 }


Generated on Sat Oct 13 16:08:49 2001 for XMILL by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001