====== Local Shared Object envelope ====== {{tag>documentation amf SharedObject}} A Local Shared Object file (.SOL) consists of a short header, and then a set of name:value pairs comprising that object. All data in the Local Shared Object file format is [[documentation:amf]]-based, and thus big endian (unlike [[documentation:swf|SWF]]). ===== Format ===== See this table : ^ Field ^ Data Type ^ Example ^ Description ^ | Byte Order Marker | byte[2] | "\x00\xbf" | 00BF indicates Big Endian file encoding, BF00 indicates Little Endian | | Length | uint32_be | "\x00\x00\x00\x25" (37) | Length of the *rest* of the .SOL file (filesize - 6) | | Signature? | byte[10] | "TCSO\x00\x04\x00\x00\x00\x00" | Unknown | | Root Object Name | UTF-8 string | "\x00\x06my_sol" ("my_sol") | Name of the root object (uint16_be length prefixed UTF-8) | | Padding? | byte[3] | "\x00\x00\x00" | Unknown | | AMF Version | byte[1] | "\x00" or "\x03" | AMF format version; 0 == AMF0, 3 == AMF3 | ... and then name:value pairs until the end of file, as such: ^ Field ^ Data Type ^ Example ^ Description ^ | Name | UTF-8 string | "\x00\x04name" ("name") | Name of the property | | Value | [[documentation:amf]] | "\x02\x00\x05value" ("value") | [[documentation:amf]] value with type code | | Padding | byte | "\x00" | NULL byte |