if (fread(&size, sizeof(size), 1, stream) != 1)
if (readUInt32(stream, &size) != 1)
static bool readTokens(FILE* stream, Tokenizer& tokenizer){    PRUint32 tokenCount;    if (fread(&tokenCount, sizeof(tokenCount), 1, stream) != 1)        return false;    PRUint32 bufferSize = 4096;    char* buffer = new char[bufferSize];    if (!buffer) return false;    for (PRUint32 i = 0; i < tokenCount; ++i) {        PRUint32 count;        if (fread(&count, sizeof(count), 1, stream) != 1)            break;        PRUint32 size;        if (fread(&size, sizeof(size), 1, stream) != 1)            break;        if (size > (bufferSize - 1)) {            delete[] buffer;            PRUint32 newBufferSize = 2 * bufferSize;            while (size > (newBufferSize - 1))                newBufferSize *= 2;            buffer = new char[newBufferSize];            if (!buffer) return false;            bufferSize = newBufferSize;        }        if (fread(buffer, size, 1, stream) != 1)            break;        buffer[size] = '\0';        tokenizer.add(buffer, count);    }        delete[] buffer;        return true;}