Functions to read xtv binary files