| | 1 | |
| | 2 | = SV8 specification draft = |
| | 3 | |
| | 4 | |
| | 5 | == File header == |
| | 6 | |
| | 7 | || '''Field''' || '''length (bits)''' || '''Value''' || |
| | 8 | || Magic || 24 || "MP+" || |
| | 9 | || Version || 8 || 0x08 || |
| | 10 | This file header allow old mpc readers to stop decoding at this point, without crashing. |
| | 11 | |
| | 12 | == Block formating == |
| | 13 | |
| | 14 | All blocks are formated using Key / Length / Value. |
| | 15 | Key is 16 bits long. It's the block type. |
| | 16 | Length is a variable size field using the same values as [http://www.matroska.org/technical/specs/index.html matroska] : |
| | 17 | bits, big-endian |
| | 18 | 1xxx xxxx - value 0 to 2^7-2 |
| | 19 | 01xx xxxx xxxx xxxx - value 0 to 2^14-2 |
| | 20 | 001x xxxx xxxx xxxx xxxx xxxx - value 0 to 2^21-2 |
| | 21 | 0001 xxxx xxxx xxxx xxxx xxxx xxxx xxxx - value 0 to 2^28-2 |
| | 22 | ... |
| | 23 | The length is the size of the block in bytes, including the key and size fields. So the minimum length of a block is 3. |
| | 24 | The value is the block content. Its size can be 0. |
| | 25 | |
| | 26 | || '''Field''' || '''length (bits)''' || '''Value''' || |
| | 27 | || Key || 16 || "EX" || |
| | 28 | || Length || n * 8, 0 < n < inf || 0x1A || |
| | 29 | || Value || Lentgh * 8 || "exemple" || |