uint64_t ReadFile::readULE64() { PHYSFS_uint64 val; if(!PHYSFS_readULE64(file, &val)) throw Exception("read error: %s", PHYSFS_getLastError()); return val; }
uint64 FileStream::getU64() { uint64 v = 0; if(!m_caching) { if(PHYSFS_readULE64(m_fileHandle, (PHYSFS_uint64*)&v) == 0) throwError("read failed", true); } else { if(m_pos+8 > m_data.size()) throwError("read failed"); v = stdext::readLE64(&m_data[m_pos]); m_pos += 8; } return v; }