a)
try
[pascal]
function IsAPack(FileName: string): Boolean;
var
Stream: TFileStream;
Signature: string[6];
begin
Result := False; // Prove me wrong!
Stream := TFileStream.Create(FileName, fmOpenRead);
Stream.Seek(SizeOf(Signature), soFromEnd);
Stream.ReadBuffer(Signature, SizeOf(Signature));
Stream.Free;
if Signature = 'GTPACK' then
Result := True;
end;
[/pascal]

b)
Your second question (how do you know how many headers you have) is answered by the image in my last post:
Your package file should have the following structure: the actual files followed by a file table follow by a footer. The footer can consist of only two values, the Signature and a value "FileCount" which tells you how many files there are in your package. You'd then do something like

[pascal]
PackageStream.Seek(SizeOf(Signature) + SizeOf(Int64) + (FileCount * SizeOf(TPackageItem)), soFromEnd);
for I := 1 to FileCount do
begin
Stream.Read(PackageItem, SizeOf(TPackageItem);
// Add the package item to a list
end;
[/pascal]