C4 Engine Terathon Software C4 Engine API Documentation

• Message Manager

API Links
Developer Links

Decompressor::Read

Defined in:  C4Messages.h
Reads arbitrary data from the internal buffer.
Prototype

Decompressor& Read(void *dataPtr, unsigned_int32 dataSize);

Description
The Read 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 Read 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::Write function can be read by the Decompressor::Read function on a receiving machine running on hardware having the opposite native endian.