26 #ifndef TAGLIB_ASFUTILS_H
27 #define TAGLIB_ASFUTILS_H
31 #ifndef DO_NOT_DOCUMENT // tell Doxygen not to document this header
40 inline unsigned short readWORD(File *file,
bool *ok = 0)
42 const ByteVector v = file->readBlock(2);
48 return v.toUShort(
false);
51 inline unsigned int readDWORD(File *file,
bool *ok = 0)
53 const ByteVector v = file->readBlock(4);
59 return v.toUInt(
false);
62 inline long long readQWORD(File *file,
bool *ok = 0)
64 const ByteVector v = file->readBlock(8);
70 return v.toLongLong(
false);
73 inline String readString(File *file,
int length)
75 ByteVector data = file->readBlock(length);
76 unsigned int size = data.size();
78 if(data[size - 1] !=
'\0' || data[size - 2] !=
'\0') {
83 if(size != data.size()) {
89 inline ByteVector renderString(
const String &str,
bool includeLength =
false)