tet file header parsing