/*! @file helpers-binary.h */ #ifndef HELPERS_BINARY_H #define HELPERS_BINARY_H #include "emb-file.h" #ifdef __cplusplus extern "C" { #endif char binaryReadByte(EmbFile* file); int binaryReadBytes(EmbFile* file, unsigned char* destination, int count); short binaryReadInt16(EmbFile* file); int binaryReadInt32(EmbFile* file); unsigned char binaryReadUInt8(EmbFile* file); unsigned short binaryReadUInt16(EmbFile* file); unsigned int binaryReadUInt32(EmbFile* file); short binaryReadInt16BE(EmbFile* file); /* Big endian version */ unsigned short binaryReadUInt16BE(EmbFile* file); /* Big endian version */ int binaryReadInt32BE(EmbFile* file); /* Big endian version */ unsigned int binaryReadUInt32BE(EmbFile* file); float binaryReadFloat(EmbFile* file); void binaryReadString(EmbFile* file, char *buffer, int maxLength); void binaryReadUnicodeString(EmbFile* file, char *buffer, const int stringLength); void binaryWriteByte(EmbFile* file, unsigned char data); void binaryWriteBytes(EmbFile* file, const char* data, int size); void binaryWriteShort(EmbFile* file, short data); void binaryWriteShortBE(EmbFile* file, short data); void binaryWriteUShort(EmbFile* file, unsigned short data); void binaryWriteUShortBE(EmbFile* file, unsigned short data); void binaryWriteInt(EmbFile* file, int data); void binaryWriteIntBE(EmbFile* file, int data); void binaryWriteUInt(EmbFile* file, unsigned int data); void binaryWriteUIntBE(EmbFile* file, unsigned int data); void binaryWriteFloat(EmbFile* file, float data); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* HELPERS_BINARY_H */ /* kate: bom off; indent-mode cstyle; indent-width 4; replace-trailing-space-save on; */