Files
2023-02-15 10:09:07 -08:00

43 lines
920 B
Plaintext

#ifndef _FOOTER
#define _FOOTER
struct AssetInfo
{
GUID id;
CompressionType compressionType;
byte pad[3] <hidden=true>;
uint64 origOffset <format=hex>;
};
typedef struct(FourCC type)
{
ChunkDescriptor chunk;
local uint64 start <format=hex, hidden=true> = FTell();
switch (chunk.id)
{
case "AINF":
AssetInfo info;
break;
case "META":
Meta meta(type, chunk.size, 0);
break;
case "NAME":
char name[chunk.size];
break;
}
FSeek(start + chunk.size);
} FooterChunk <name=(Str("%s chunk", chunk.id))>;
typedef struct(FourCC type)
{
FormDescriptor form;
local uint64 start <format=hex, hidden=true> = FTell();
while (FTell() < start + form.size)
{
FooterChunk chunk(type);
}
FSeek(start + form.size);
} Footer <name="Extracted file info">;
#endif// _FOOTER