C4 Engine Terathon Software C4 Engine API Documentation

• Message Manager

API Links
Developer Links

Compressor::Write

Defined in:  C4Messages.h
Writes arbitrary data to the internal buffer.
Prototype

Compressor& Write(const void *dataPtr, unsigned long dataSize);

Description
The Write 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 Write 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.