hSeek package:tar

Seek to the end of a tar file, to the position where new entries can be appended, and return that TarEntryOffset. If you have a valid TarIndex for this tar file then you should supply it because it allows seeking directly to the correct location. If you do not have an index, then this becomes an expensive linear operation because we have to read each tar entry header from the beginning to find the location immediately after the last entry (this is because tar files have a variable length trailer and we cannot reliably find that by starting at the end). In this mode, it will fail with an exception if the file is not in fact in the tar format.
Set the Handle position to the entry content position corresponding to the given TarEntryOffset. This position is where the entry content can be read using ordinary I/O operations (though you have to know in advance how big the entry content is). This is only valid if you already know the entry has a body (i.e. is a normal file).
Set the Handle position to the position corresponding to the given TarEntryOffset. This position is where the entry metadata can be read. If you already know the entry has a body (and perhaps know it's length), you may wish to seek to the body content directly using hSeekEntryContentOffset.