Space Engineers
Public Member Functions | Public Attributes | List of all members
VRage.Library.Collections.BitReader Struct Reference

Lightweight bit reader which works on native pointer. Stores bit length and current position. More...

Public Member Functions

 BitReader (IntPtr data, int bitLength)
 
void Reset (IntPtr data, int bitLength)
 
ulong ReadInternal (int bitSize)
 
double ReadDouble ()
 
float ReadFloat ()
 
decimal ReadDecimal ()
 
bool ReadBool ()
 
sbyte ReadSByte (int bitCount=sizeof(sbyte)*8)
 
short ReadInt16 (int bitCount=sizeof(short)*8)
 
int ReadInt32 (int bitCount=sizeof(int)*8)
 
long ReadInt64 (int bitCount=sizeof(long)*8)
 
byte ReadByte (int bitCount=sizeof(byte)*8)
 
ushort ReadUInt16 (int bitCount=sizeof(ushort)*8)
 
uint ReadUInt32 (int bitCount=sizeof(uint)*8)
 
ulong ReadUInt64 (int bitCount=sizeof(ulong)*8)
 
int ReadInt32Variant ()
 
long ReadInt64Variant ()
 
uint ReadUInt32Variant ()
 
ulong ReadUInt64Variant ()
 
char ReadChar (int bitCount=sizeof(char)*8)
 
void ReadMemory (IntPtr ptr, int bitSize)
 
void ReadMemory (void *ptr, int bitSize)
 
string ReadPrefixLengthString (Encoding encoding)
 
void ReadBytes (byte[] bytes, int start, int count)
 

Public Attributes

ulong * m_buffer
 
int m_bitLength
 
int BitPosition
 

Detailed Description

Lightweight bit reader which works on native pointer. Stores bit length and current position.

Definition at line 12 of file BitReader.cs.

Constructor & Destructor Documentation

VRage.Library.Collections.BitReader.BitReader ( IntPtr  data,
int  bitLength 
)
inline

Definition at line 19 of file BitReader.cs.

Member Function Documentation

bool VRage.Library.Collections.BitReader.ReadBool ( )
inline

Definition at line 83 of file BitReader.cs.

byte VRage.Library.Collections.BitReader.ReadByte ( int  bitCount = sizeof(byte) * 8)
inline

Definition at line 108 of file BitReader.cs.

void VRage.Library.Collections.BitReader.ReadBytes ( byte[]  bytes,
int  start,
int  count 
)
inline

Definition at line 276 of file BitReader.cs.

char VRage.Library.Collections.BitReader.ReadChar ( int  bitCount = sizeof(char) * 8)
inline

Definition at line 222 of file BitReader.cs.

decimal VRage.Library.Collections.BitReader.ReadDecimal ( )
inline

Definition at line 75 of file BitReader.cs.

double VRage.Library.Collections.BitReader.ReadDouble ( )
inline

Definition at line 63 of file BitReader.cs.

float VRage.Library.Collections.BitReader.ReadFloat ( )
inline

Definition at line 69 of file BitReader.cs.

short VRage.Library.Collections.BitReader.ReadInt16 ( int  bitCount = sizeof(short) * 8)
inline

Definition at line 93 of file BitReader.cs.

int VRage.Library.Collections.BitReader.ReadInt32 ( int  bitCount = sizeof(int) * 8)
inline

Definition at line 98 of file BitReader.cs.

int VRage.Library.Collections.BitReader.ReadInt32Variant ( )
inline

Definition at line 140 of file BitReader.cs.

long VRage.Library.Collections.BitReader.ReadInt64 ( int  bitCount = sizeof(long) * 8)
inline

Definition at line 103 of file BitReader.cs.

long VRage.Library.Collections.BitReader.ReadInt64Variant ( )
inline

Definition at line 145 of file BitReader.cs.

ulong VRage.Library.Collections.BitReader.ReadInternal ( int  bitSize)
inline

Definition at line 36 of file BitReader.cs.

void VRage.Library.Collections.BitReader.ReadMemory ( IntPtr  ptr,
int  bitSize 
)
inline

Definition at line 227 of file BitReader.cs.

void VRage.Library.Collections.BitReader.ReadMemory ( void *  ptr,
int  bitSize 
)
inline

Definition at line 232 of file BitReader.cs.

string VRage.Library.Collections.BitReader.ReadPrefixLengthString ( Encoding  encoding)
inline

Definition at line 251 of file BitReader.cs.

sbyte VRage.Library.Collections.BitReader.ReadSByte ( int  bitCount = sizeof(sbyte) * 8)
inline

Definition at line 88 of file BitReader.cs.

ushort VRage.Library.Collections.BitReader.ReadUInt16 ( int  bitCount = sizeof(ushort) * 8)
inline

Definition at line 113 of file BitReader.cs.

uint VRage.Library.Collections.BitReader.ReadUInt32 ( int  bitCount = sizeof(uint) * 8)
inline

Definition at line 118 of file BitReader.cs.

uint VRage.Library.Collections.BitReader.ReadUInt32Variant ( )
inline

Definition at line 150 of file BitReader.cs.

ulong VRage.Library.Collections.BitReader.ReadUInt64 ( int  bitCount = sizeof(ulong) * 8)
inline

Definition at line 123 of file BitReader.cs.

ulong VRage.Library.Collections.BitReader.ReadUInt64Variant ( )
inline

Definition at line 175 of file BitReader.cs.

void VRage.Library.Collections.BitReader.Reset ( IntPtr  data,
int  bitLength 
)
inline

Definition at line 26 of file BitReader.cs.

Member Data Documentation

int VRage.Library.Collections.BitReader.BitPosition

Definition at line 17 of file BitReader.cs.

int VRage.Library.Collections.BitReader.m_bitLength

Definition at line 15 of file BitReader.cs.

ulong* VRage.Library.Collections.BitReader.m_buffer

Definition at line 14 of file BitReader.cs.


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