28 #include <zlib/zlib.h>
96 void Open(
const std::string& filename,
const char* mode);
98 int Read(
char* data,
const unsigned int dataLength);
106 unsigned int Write(
const char* data,
const unsigned int dataLen);
149 buffer[0] = (char)value;
150 buffer[1] = (char)(value >> 8);
151 buffer[2] = (char)(value >> 16);
152 buffer[3] = (char)(value >> 24);
158 buffer[0] = (char)value;
159 buffer[1] = (char)(value >> 8);
165 union {
signed int value;
unsigned char valueBuffer[
sizeof(
signed int)]; } un;
167 un.valueBuffer[0] = buffer[0];
168 un.valueBuffer[1] = buffer[1];
169 un.valueBuffer[2] = buffer[2];
170 un.valueBuffer[3] = buffer[3];
177 union {
unsigned int value;
unsigned char valueBuffer[
sizeof(
unsigned int)]; } un;
179 un.valueBuffer[0] = buffer[0];
180 un.valueBuffer[1] = buffer[1];
181 un.valueBuffer[2] = buffer[2];
182 un.valueBuffer[3] = buffer[3];
189 union {
unsigned short value;
unsigned char valueBuffer[
sizeof(
unsigned short)];} un;
191 un.valueBuffer[0] = buffer[0];
192 un.valueBuffer[1] = buffer[1];