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