HolyLib Wiki

bf_read

bf_read

Metatable function Description
__tostring Returns a formated string of the bf_read -> bf_read [size in bits]
__index Used to find the functions on the metatable and access saved variables
__newindex Used to allow one to save variables on the object
__gc Internally deletes the bf_read turning it invalid

Methods

number bf_read:GetCurrentBit( )
Returns the current position/bit. This is only available for the 32x!
number bf_read:GetNumBits( )
Returns the size of the data in bits.
Returns the number of bits left.
Returns the number of bits read.
number bf_read:GetNumBytes( )
Returns the size of the data in bytes.
Returns the number of bytes left.
Returns the number of bytes read.
table bf_read:GetTable( )
Returns the lua table used by newindex and index
boolean bf_read:IsOverflowed( )
Returns true if the buffer is overflowed.
boolean bf_read:IsValid( )
Returns true if the buffer is valid.
number bf_read:PeekUBitLong( number bits )
Peaks to the given bit(doesn't change current position) and returns the value.
number bf_read:ReadBitAngle( number bits )
Peaks to the given bit(doesn't change current position) and returns the value.
Angle bf_read:ReadBitAngles( )
Reads a Angle
number bf_read:ReadBitCoord( )
This is only available for the 32x!
This is only available for the 32x!
number bf_read:ReadBitCoordMP( boolean integral = false, boolean lowprecision = false )
This is only available for the 32x!
number bf_read:ReadBitCoordMPBits( boolean integral = false, boolean lowprecision = false )
This is only available for the 32x!
number bf_read:ReadBitFloat( )
number bf_read:ReadBitLong( number bits, boolean signed = false )
Reads a number with the given number of bits.
This is only available for the 32x!
number bf_read:ReadBitNormal( )
string bf_read:ReadBits( number bits )
Reads the given number of bits.
Reads a Vector
Reads a normalizted Vector
number bf_read:ReadByte( )
Reads a byte
string bf_read:ReadBytes( number bytes )
Reads the given number of bytes.
number bf_read:ReadChar( )
Reads a char.
number bf_read:ReadFloat( )
Reads a float.
number bf_read:ReadLong( )
Reads a long.
number bf_read:ReadLongLong( )
Reads a long long.
number bf_read:ReadOneBit( )
Reads one bit.
number bf_read:ReadSBitLong( number bits )
Reads a signed number with the given number of bits.
If you want to read a unsigned number use bf_read:ReadBitLong or bf_read:ReadUBitLong
number bf_read:ReadShort( )
Reads a short.
string bf_read:ReadString( )
Reads a null terminated string.
number bf_read:ReadUBitLong( number bits )
Reads a unsigned number with the given number of bits.
If you want to read a signed number use bf_read:ReadBitLong or bf_read:ReadSBitLong
number bf_read:ReadUBitVar( )
number bf_read:ReadVarInt32( )
number bf_read:ReadVarInt64( )
number bf_read:ReadWord( )
bf_read:Reset()
Resets the current position and resets the overflow flag.
boolean bf_read:Seek( number pos )
Sets the current position to the given position.
boolean bf_read:SeekRelative( number pos )
Sets the current position to the given position relative to the current position.
Basicly newPosition = currentPosition + iPos