Whenever attempting to restore a backup file, the users have to manually specify the header length used in their file. Most users will have no idea which header format was used. It is surely tied to either options specified at the time of backup, or has to do with the particular version of Quarterback used.
Either way, it should be possible to determine which format is used, and simply automatically process the file.
One simple method could look at the first two 4-byte file size entries at offset 222 (decimal) and see if they match. 20-byte headers will match, and 16-byte headers will not.
I don't love hard coding the offsets because I'm not sure if they will vary between versions, etc. However, this could lead to discovering a bigger issue..... where I can't process different versions anyways.
Whenever attempting to restore a backup file, the users have to manually specify the header length used in their file. Most users will have no idea which header format was used. It is surely tied to either options specified at the time of backup, or has to do with the particular version of Quarterback used.
Either way, it should be possible to determine which format is used, and simply automatically process the file.
One simple method could look at the first two 4-byte file size entries at offset 222 (decimal) and see if they match. 20-byte headers will match, and 16-byte headers will not.
I don't love hard coding the offsets because I'm not sure if they will vary between versions, etc. However, this could lead to discovering a bigger issue..... where I can't process different versions anyways.