Decompressor::ReadData
Defined in:
Reads arbitrary data from the internal buffer.
C4Messages.h
Prototype
Decompressor& ReadData(void *dataPtr, uint32 dataSize);
Parameters
dataPtr |
A pointer to the buffer to where the data will be stored. |
dataSize |
The number of bytes to read. |
Description
The ReadData
function copies the number of bytes specified by the dataSize
parameter from the Decompressor
object's internal buffer to the buffer specified by the dataPtr
parameter.
Special Considerations
Data read from a Decompressor
object by the ReadData
function is not converted to the native endian of the local machine because its format is unknown. If cross-platform compatibility is of concern, care should be taken to ensure that data written by the Compressor::WriteData
function can be read by the Decompressor::ReadData
function on a receiving machine running on hardware having the opposite native endian.