POD Block Structure

A basic block in a POD file is composed of a data sandwiched between a start and an end tag

Every block in the file is made up of data sandwiched between a start tag and an end tag, both of which are 8 bytes long. These tags are used to specify the type of data between them and its length.

Start and end tags

The start and end tags define the size of the data in a block, as well as what type of block it is

The Start Tag and End Tag share the same structure. They are split into two DWORDs.

The first DWORD specifies whether the tag is a Start Tag or an End Tag and also specifies the identifier of the block. Each type of block has a unique identifier number which can be used to specify the block type. For example, a block which contains data on the number of cameras in a scene has the unique identifier 2002, while a block which specifies the number of faces in a mesh has an identifier 6001.

The second DWORD specifies the length in bytes of the data block between the two tags.

DWORD Bit Symbol Description
0 31 Start/End Bit Value = 0 – This tag is the beginning of a block Bit Value = 1 – This tag is the end of a block
0 – 30 Identifier Block Type Identifier
1 0 – 31 Length The length of ‘Data’ in bytes.

Data may contain blocks, which may, in turn, contain further blocks and so on. It should also be noted that a block which contains only further nested blocks between its Start Tag and End Tag will have a Length of zero.

Reading POD Files

The simple algorithm for reading a POD file is shown in pseudocode below.
While not at end-of-file
	Read 8 bytes from file
		If 'Identifier' is a valid 'Start Tag'
			Read 'Length' number of bytes of 'Data'.
				Handle ‘Data’
			Go down a level in nested structure
		Else if 'Identifier' is valid 'End Tag':
			Read 'Length' number of bytes of 'Data'.
				Handle 'Data'
			Go up a level in nested structure