![]() |
||||||||
|
|
||||||||

Public Member Functions | |
| void | Clear () |
| Remove all data and reset position counters. | |
| ZCom_BitStream * | Duplicate () const |
| Make exact copy of this object, including position counters. | |
| bool | isEqual (const ZCom_BitStream &_other) const |
| Check if two bitstreams contain the same data. | |
| void | operator delete (void *_p) |
| Overloaded memory operator ensuring that always Zoidcom's delete gets called. | |
| void * | operator new (size_t _size) |
| Overloaded memory operator ensuring that always Zoidcom's new gets called. | |
| ZCom_BitStream & | operator= (const ZCom_BitStream &_str) |
| Assignment operator. | |
| ZCom_BitStream (const ZCom_BitStream &_str) | |
| Copy constructor. | |
| ZCom_BitStream (zU16 _maxfill=64) | |
| Constructor. | |
| ~ZCom_BitStream () | |
| Destructor. | |
Data operations | |
| bool | addBitStream (ZCom_BitStream *_stream, bool _allow_align=false) |
| Add an existing bitstream to the stream. | |
| bool | addBool (bool _b) |
| Add a bool to the stream. | |
| bool | addBuffer (char *_buf, zU16 _size) |
| Add a buffer to the stream. | |
| bool | addFloat (zFloat _f, zU8 _mant_bits) |
| Add a float to the stream. | |
| bool | addInt (zU32 _data, zU8 _bits) |
| Add an int to the stream. | |
| bool | addSignedInt (zS32 _data, zU8 _bits) |
| Add a signed int to the stream. | |
| bool | addString (const char *_string) |
| Add a string to the stream. | |
| bool | addStringW (const wchar_t *_string) |
| Add a string to the stream. | |
| ZCom_BitStream * | getBitStream (zU32 _bits, bool _allow_align=false) |
| Retrieve a whole bitstream. | |
| bool | getBool () |
| Retrieve a bool. | |
| zU16 | getBuffer (char *_buf, zU16 _bytes) |
| Retrieve a buffer. | |
| zU16 | getBufferMax (void) |
| Get amount of bytes available for buffer get. | |
| zFloat | getFloat (zU8 _mant_bits) |
| Retrieve a float. | |
| zU32 | getInt (zU8 _bits) |
| Retrieve an int. | |
| zS32 | getSignedInt (zU8 _bits) |
| Retrieve signed int. | |
| void | getString (char *_buf, zU16 _maxsize) |
| Retrieve a string. | |
| zU16 | getStringLength () |
| Get length of upcoming string. | |
| zU16 | getStringSize () |
| Get size of upcoming string. | |
| const char * | getStringStatic () |
| Retrieve a string via static buffer. | |
| void | getStringW (wchar_t *_buf, zU16 _maxsize) |
| Get size of upcoming string. Retrieve a string. | |
| zU16 | getStringWLength () |
| Get length of upcoming string. | |
| const wchar_t * | getStringWStatic () |
| Retrieve a string via static buffer. | |
| void | skipBits (zU32 _amount) |
| Skip some bits in the stream. This only affects the get* methods. | |
| void | skipBool () |
| Skip a bool. | |
| void | skipBuffer (zU16 _bytes) |
| Skip a stored buffer in the stream. | |
| void | skipFloat (zU8 _mant_bits) |
| Skip a float. | |
| void | skipInt (zU8 _bits) |
| Skip an int. | |
| void | skipSignedInt (zU8 _bits) |
| Skip a signed int. | |
| void | skipString () |
| Skip a string or wstring. | |
Data size checks. | |
| bool | checkFull () const |
| Check if stream limit has been exceeded. | |
| bool | checkMax (zU32 _bits) |
| Check if stream has enough space for _bits more bits. | |
| bool | endOfStream () const |
| Check if stream read pos is at end of stream. | |
| zU32 | getBitCount () const |
| Get amount of bits stored in the stream. | |
(De-)Serialization. | |
| bool | Deserialize (char *_ptr, zU16 _size) |
| Deserialize array to stream. | |
| zU16 | getSizeHint (void) |
| Get needed size for serialize buffer. | |
| bool | Serialize (char *_ptr, zU16 *_size, zU16 _max_size) |
| Serialize stream to array. | |
Stream position operations. | |
| void | logReadState () |
| Log current read position to the log output. | |
| void | logWriteState () |
| Log current write position to the log output. | |
| void | resetReadState () |
| Reset read state to beginning of stream. | |
| void | restoreReadState (const BitPos &_pos) |
| Restore read state (Undos all get*** calls since 'saveReadState'). | |
| void | restoreWriteState (const BitPos &_pos) |
| Restore write state. (Undos all add*** calls since 'saveWriteState'). | |
| void | saveReadState (BitPos &_pos) const |
| Store read state. | |
| void | saveWriteState (BitPos &_pos) const |
| Store write state. | |
Classes | |
| struct | BitPos |
| Position in bitstream. More... | |
|
|
Constructor.
|
|
|
Copy constructor.
|
|
|
Destructor.
|
|
|
Remove all data and reset position counters.
|
|
|
Make exact copy of this object, including position counters.
|
|
|
Store write state.
|
|
|
Restore write state. (Undos all add*** calls since 'saveWriteState').
|
|
|
Store read state.
|
|
|
Restore read state (Undos all get*** calls since 'saveReadState').
|
|
|
Reset read state to beginning of stream.
|
|
|
Log current read position to the log output.
|
|
|
Log current write position to the log output.
|
|
|
Check if stream has enough space for _bits more bits.
|
|
|
Check if stream limit has been exceeded.
|
|
|
Check if stream read pos is at end of stream.
|
|
|
Get amount of bits stored in the stream.
|
|
||||||||||||||||
|
Serialize stream to array.
|
|
||||||||||||
|
Deserialize array to stream.
|
|
|
Get needed size for serialize buffer.
|
|
||||||||||||
|
Add an int to the stream.
|
|
|
Retrieve an int.
|
|
|
Skip an int.
|
|
||||||||||||
|
Add a signed int to the stream.
|
|
|
Retrieve signed int.
|
|
|
Skip a signed int.
|
|
|
Add a bool to the stream.
|
|
|
Retrieve a bool.
|
|
|
Skip a bool.
|
|
||||||||||||
|
Add a float to the stream.
|
|
|
Retrieve a float.
|
|
|
Skip a float.
|
|
|
Add a string to the stream.
|
|
|
Get size of upcoming string.
|
|
|
Get length of upcoming string.
|
|
||||||||||||
|
Retrieve a string.
|
|
|
Retrieve a string via static buffer.
|
|
|
Skip a string or wstring.
|
|
|
Add a string to the stream.
|
|
||||||||||||
|
Get size of upcoming string. Retrieve a string.
|
|
|
Get length of upcoming string.
|
|
|
Retrieve a string via static buffer.
|
|
||||||||||||
|
Add a buffer to the stream.
|
|
||||||||||||
|
Retrieve a buffer.
|
|
|
Skip a stored buffer in the stream.
|
|
|
Get amount of bytes available for buffer get.
|
|
||||||||||||
|
Add an existing bitstream to the stream.
|
|
||||||||||||
|
Retrieve a whole bitstream.
|
|
|
Skip some bits in the stream. This only affects the get* methods.
|
|
|
Check if two bitstreams contain the same data.
|
|
|
Overloaded memory operator ensuring that always Zoidcom's new gets called.
|
|
|
Overloaded memory operator ensuring that always Zoidcom's delete gets called.
|
|
|
Assignment operator.
|
1.4.6-NO