libmspub_utils.cpp File Reference
`#include "libmspub_utils.h"`
`#include <cstdarg>`
`#include <cstring>`
`#include <string.h>`
`#include <unicode/ucnv.h>`
`#include <unicode/utypes.h>`
`#include <zlib.h>`

## Namespaces

namespace | libmspub

## Macros

#define | ZLIB_CHUNK 16384
#define | MSPUB_NUM_ELEMENTS(array)
#define | SURROGATE_VALUE(h, l)

## Functions

const char * | libmspub::windowsCharsetNameByOriginalCharset (const char *name)
const char * | libmspub::mimeByImgType (ImgType type)
void | libmspub::rotateCounter (double &x, double &y, double centerX, double centerY, short rotation)
double | libmspub::doubleModulo (double x, double y)
double | libmspub::toFixedPoint (int fp)
double | libmspub::readFixedPoint (librevenge::RVNGInputStream *input)
void | libmspub::flipIfNecessary (double &x, double &y, double centerX, double centerY, bool flipVertical, bool flipHorizontal)
unsigned | libmspub::correctModulo (int x, unsigned n)
librevenge::RVNGBinaryData | libmspub::inflateData (librevenge::RVNGBinaryData deflated)
uint8_t | libmspub::readU8 (librevenge::RVNGInputStream *input)
uint16_t | libmspub::readU16 (librevenge::RVNGInputStream *input)
uint32_t | libmspub::readU32 (librevenge::RVNGInputStream *input)
int8_t | libmspub::readS8 (librevenge::RVNGInputStream *input)
int16_t | libmspub::readS16 (librevenge::RVNGInputStream *input)
int32_t | libmspub::readS32 (librevenge::RVNGInputStream *input)
uint64_t | libmspub::readU64 (librevenge::RVNGInputStream *input)
void | libmspub::readNBytes (librevenge::RVNGInputStream *input, unsigned long length, std::vector< unsigned char > &out)
unsigned long | libmspub::getLength (librevenge::RVNGInputStream *const input)
void | libmspub::appendCharacters (librevenge::RVNGString &text, const std::vector< unsigned char > &characters, const char *encoding)
bool | libmspub::stillReading (librevenge::RVNGInputStream *input, unsigned long until)

## Macro Definition Documentation

## MSPUB_NUM_ELEMENTS

#define MSPUB_NUM_ELEMENTS | ( |  | array | ) |

Value:
sizeof(array)/sizeof(array[0])

## SURROGATE_VALUE

#define SURROGATE_VALUE | ( |  | h,
|  |  | l )

Value:
(((h) - 0xd800) * 0x400 + (l) - 0xdc00 + 0x10000)

## ZLIB_CHUNK

#define ZLIB_CHUNK 16384

Referenced by libmspub::inflateData().