Acorn's binary format is used as an efficient way to transmit serialized data of any level of complexity. It is used in several scenarios:

This section describes how Acorn data is serialized in a binary encoding. It is optimized for rapid, sequential loading of the entire data structure into an existing virtual machine. The resulting single value from the loaded data is then used by whatever program requested and received it.

The Header

All .avm files begin with this header block.


The rest of the file is a sequential collection of variable-sized blocks. Each block implicitly has a number (starting with 0), representing its position in the sequence. While loading, Acorn will map this number index to its internal value (typically a pointer). The blocks are effectively bottom-up sequenced, so a list would have a block for each of its members, before putting the block for the list itself.

Every block begins with:

Null, true, false block

Integer block

Float block

Small symbol block

Large symbol block

Byte block

Integer List block

Float List block

Value List block

Property List block

Function Call block

Data Synchronization

TBD: Address format of data synchronized between servers and client devices (multiple pieces of data updated), and maybe to run an update or assignment "program".