1 #ifndef __lib_base_rawfile_h
2 #define __lib_base_rawfile_h
12 int open(const char *filename, int cached = 0);
14 off_t lseek(off_t offset, int whence);
16 ssize_t read(void *buf, size_t count); /* NOTE: you must be able to handle short reads! */
20 int m_fd; /* for uncached */
21 FILE *m_file; /* for cached */
24 std::string m_basename;
25 off_t m_splitsize, m_totallength, m_current_offset, m_base_offset, m_last_offset;
29 int switchOffset(off_t off);
30 FILE *openFileCached(int nr);
31 int openFileUncached(int nr);