2.4.3 FileNode

A FileNode structure is the basic unit for holding and referencing data in the file. FileNode structures are organized into file node lists (section 2.4).

A FileNode structure is divided into header fields and a data field, fnd. The header fields specify what type of FileNode structure it is, and what format the fnd field is in. The fnd field can be empty, or it can contain data directly, or it can contain a reference to another block of the file by byte position and byte count, or it can contain both data and a reference.

This structure has the following format.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

FileNodeID

Size

A

B

C

D

fnd (variable)

...

FileNodeID (10 bits): An unsigned integer that specifies the type of this FileNode structure. The meaning of this value is specified by the fnd field.

Size (13 bits): An unsigned integer that specifies the size, in bytes, of this FileNode structure.

A - StpFormat (2 bits): An unsigned integer that specifies the size and format of the FileNodeChunkReference.stp field specified by the fnd field if this FileNode structure has a value of the BaseType field equal to 1 or 2. MUST be ignored if the value of the BaseType field of this FileNode structure is equal to 0. The meaning of the StpFormat field is given by the following table.

Value

Meaning

0

8 bytes, uncompressed.

1

4 bytes, uncompressed.

2

2 bytes, compressed.

3

4 bytes, compressed.

The value of an uncompressed file pointer specifies a location in the file. To uncompress a compressed file pointer, multiply the value by 8.

B - CbFormat (2 bits): An unsigned integer that specifies the size and format of the FileNodeChunkReference.cb field specified by the fnd field if this FileNode structure has a BaseType field value equal to 1 or 2. MUST be 0 and MUST be ignored if BaseType of this FileNode structure is equal to 0. The meaning of CbFormat is given by the following table.

Value

Meaning

0

4 bytes, uncompressed.

1

8 bytes, uncompressed.

2

1 byte, compressed.

3

2 bytes, compressed.

The value of an uncompressed byte count specifies the size, in bytes, of the data referenced by a FileNodeChunkReference structure (section 2.2.4.2). To uncompress a compressed byte count, multiply the value by 8.

C - BaseType (4 bits): An unsigned integer that specifies whether the structure specified by fnd contains a FileNodeChunkReference structure (section 2.2.4.2). MUST be one of the values described in the following table.

Value

Meaning

0

This FileNode structure does not reference other data. The data structure specified by fnd MUST NOT contain a FileNodeChunkReference structure. The StpFormat and CbFormat fields MUST be ignored.

1

This FileNode structure contains a reference to data. The first field in the data structure specified by an fnd field MUST be a FileNodeChunkReference structure that specifies the location and size of the referenced data. The type of the FileNodeChunkReference structure is specified by the StpFormat and CbFormat fields.

2

This FileNode structure contains a reference to a file node list. The first field in the data structure specified by the fnd field MUST be a FileNodeChunkReference structure that specifies the location and size of a file node list. The type of the FileNodeChunkReference is specified by the StpFormat and CbFormat fields.

D - Reserved (1 bit): MUST be 1, and MUST be ignored.

fnd (variable): A field that specifies additional data for this FileNode structure, if present. The type of structure is specified by the value of the FileNodeID field. Some FileNodeID field values and their corresponding structures are valid for .one or .onetoc2 only. The meaning of the FileNodeID field value is given by the following table.

Value of FileNodeID

Basetype

Fnd structure

Allowed file formats

0x004

0

ObjectSpaceManifestRootFND (section 2.5.1)

one

onetoc2

0x008

2

ObjectSpaceManifestListReferenceFND (section 2.5.2)

one

onetoc2

0x00C

0

ObjectSpaceManifestListStartFND (section 2.5.3)

one

onetoc2

0x010

2

RevisionManifestListReferenceFND (section 2.5.4)

one

onetoc2

0x014

0

RevisionManifestListStartFND (section 2.5.5)

one

onetoc2

0x01B

0

RevisionManifestStart4FND (section 2.5.6)

onetoc2

0x01C

0

RevisionManifestEndFND

Specifies the end of a revision manifest (section 2.1.9). MUST contain no data.

one

onetoc2

0x01E

0

RevisionManifestStart6FND (section 2.5.7)

one

0x01F

0

RevisionManifestStart7FND (section 2.5.8)

one

0x021

0

GlobalIdTableStartFNDX (section 2.5.9)

onetoc2

0x022

0

GlobalIdTableStart2FND

Specifies the beginning of the global identification table (section 2.1.3). MUST contain no data.

one

0x024

0

GlobalIdTableEntryFNDX (section 2.5.10)

one

onetoc2

0x025

0

GlobalIdTableEntry2FNDX (section 2.5.11)

onetoc2

0x026

0

GlobalIdTableEntry3FNDX (section 2.5.12)

onetoc2

0x028

0

GlobalIdTableEndFNDX

Specifies the end of the global identification table (section 2.1.3). MUST contain no data.

one onetoc2

0x02D

1

ObjectDeclarationWithRefCountFNDX (section 2.5.23)

onetoc2

0x02E

1

ObjectDeclarationWithRefCount2FNDX (section 2.5.24)

onetoc2

0x041

1

ObjectRevisionWithRefCountFNDX (section 2.5.13)

onetoc2

0x042

1

ObjectRevisionWithRefCount2FNDX (section 2.5.14)

onetoc2

0x059

0

RootObjectReference2FNDX (section 2.5.15)

onetoc2

0x05A

0

RootObjectReference3FND (section 2.5.16)

one

0x05C

0

RevisionRoleDeclarationFND (section 2.5.17)

one

onetoc2

0x05D

0

RevisionRoleAndContextDeclarationFND (section 2.5.18)

one

0x072

0

ObjectDeclarationFileData3RefCountFND (section 2.5.27)

one

0x073

0

ObjectDeclarationFileData3LargeRefCountFND (section 2.5.28)

one

0x07C

1

ObjectDataEncryptionKeyV2FNDX (section 2.5.19)

one

0x084

1

ObjectInfoDependencyOverridesFND (section 2.5.20)

one

onetoc2

0x08C

0

DataSignatureGroupDefinitionFND (section 2.5.33)

one

onetoc2

0x090

2

FileDataStoreListReferenceFND (section 2.5.21)

one

0x094

1

FileDataStoreObjectReferenceFND (section 2.5.22)

one

0x0A4

1

ObjectDeclaration2RefCountFND (section 2.5.25)

one

0x0A5

1

ObjectDeclaration2LargeRefCountFND (section 2.5.26)

one

0x0B0

2

ObjectGroupListReferenceFND (section 2.5.31)

one

0x0B4

0

ObjectGroupStartFND (section 2.5.32)

one

0x0B8

0

ObjectGroupEndFND

Specifies the end of an object group (section 2.1.13). MUST contain no data.

one

0x0C2

1

HashedChunkDescriptor2FND (section 2.3.4.1)

one

0x0C4

1

ReadOnlyObjectDeclaration2RefCountFND (section 2.5.29)

one

0x0C5

1

ReadOnlyObjectDeclaration2LargeRefCountFND (section 2.5.30)

one

0x0FF

ChunkTerminatorFND

Specifies the end of the stream of FileNode structures in a FileNodeListFragment structure (section 2.4.1). MUST contain no data. MUST NOT be used in FileNodeListFragment structure that is the last fragment in the containing file node list.

one

onetoc2