I found some data for you.
procedure TTreeNodes.WriteData(Stream: TStream);
var
ANode: TTreeNode;
MagicNumber: integer;
begin
// -7 for lcl stream
MagicNumber:=LCLStreamID;
Stream.WriteBuffer(MagicNumber,SizeOf(MagicNumber));
// write stream version
Stream.WriteBuffer(TTreeNodeStreamVersion,SizeOf(Word));
// write top level node count
Stream.WriteBuffer(FTopLvlCount, SizeOf(Integer));
// write all nodes recursively
ANode := GetFirstNode;
while ANode <> nil do begin
ANode.WriteData(Stream);
ANode := ANode.GetNextSibling;
end;
end;
Apparently this is how the data is written out.
The first magic number does correspond to the $F9FFFFFF;
it's written backwards of course..
the first value is an integer (4 bytes), 8 characters of hex but as you read the stream the F9 ends up on the right side
because that is the lower nibble.
So -7 = $FFFFFFF9
This number indicates a Lazarus version.
The next group is a WORD (2 bytes, 4 characters)..
This is the Tree Node Stream Version..
after that.
Top level count of nodes which is a Integer (4 bytes, 8 Characters).
after that, follows the data of each Node starting from the FirstNode going through the siblings
You need to look at the TTreeNode.WriteData or ReadData to see how the information is interpreted ..