bf_write
bf_write
Metatable function | Description |
---|---|
__tostring |
Returns a formated string of the bf_write -> bf_write [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_write turning it invalid |
Methods
string bf_write:GetDebugName( )
Returns the debug name.
number bf_write:GetMaxNumBits( )
Returns the maximum number of bits that can be written.
number bf_write:GetNumBitsLeft( )
Returns the number of bits left.
number bf_write:GetNumBitsWritten( )
Returns the number of bits written.
number bf_write:GetNumBytesLeft( )
Returns the number of bytes that are unwritten.
number bf_write:GetNumBytesWritten( )
Returns the number of bytes written.
boolean bf_write:IsOverflowed( )
Returns
true
if the buffer is overflowed.
bf_write:Reset()
Resets the buffer.
bf_write:SetDebugName( string name )
Sets the debug name.
You should keep a reference to the string as else this might be corrupted.
So store it somewhere, where the garbage collector won't delete it.
This is because internally, it sets the pointer of the debug name to the lua string, instead of copying over the actual string.
You should keep a reference to the string as else this might be corrupted.
So store it somewhere, where the garbage collector won't delete it.
This is because internally, it sets the pointer of the debug name to the lua string, instead of copying over the actual string.
bf_write:WriteBitAngles( Angle value )
Writes a Angle
bf_write:WriteBitCoord( number value )
bf_write:WriteBitFloat( number value )
bf_write:WriteBitLong( number value )
bf_write:WriteBitNormal( number value )
Writes the given number of bits from the data into this buffer.
Writes the given number of bits from the given buffer into this buffer.
The current position for the given buffer will change as we internally read from it!
bf_write:WriteBitVec3Coord( Vector value )
Writes a Vector
bf_write:WriteBitVec3Normal( Vector value )
Writes a normalized Vector
bf_write:WriteBytes( string data )
Writes the given bytes.
bf_write:WriteFloat( number value )
Writes a float.
bf_write:WriteLongLong( number value )
Writes a long long. That's quite long xd
bf_write:WriteOneBit( boolean value = false )
Writes one bit.
Sets the given bit to the given value.
bf_write:WriteShort( number value )
Writes a short.
bf_write:WriteSignedVarInt32( number value )
bf_write:WriteSignedVarInt64( number value )
bf_write:WriteString( string value )
Writes a null terminated string
bf_write:WriteUBitVar( number value )
bf_write:WriteVarInt32( number value )
bf_write:WriteVarInt64( number value )