Skip to content

Commit d9e7030

Browse files
committed
Write multi-byte integers in proper decoded form
1 parent 4ea1bde commit d9e7030

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

docs/Zune software/Iris/compiled-uix.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Nearly all of the markup-related code is in the [`Microsoft.Iris.Markup`](https:
88
## Data format
99
Being a binary data format, UIB is capable of storing several primitive data types.
1010

11-
All integers are stored in little endian, as is standard for Windows.
11+
All integers are encoded in little endian, as is standard for Windows.
1212

1313
### Offsets
1414
All offsets are stored as unsigned 32-bit integers (`UInt32`), relative to the start of the file unless otherwise specified.
@@ -37,17 +37,17 @@ Arrays of 32-bit integers are also stored prefixed with their length, where, sim
3737
Boolean values are stored as a single byte, where `0` represents `false` and `1` represents `true`.
3838

3939
### Enums
40-
Enums are usually stored as 32-bit integers. Naturally, the meaning of a particular integer value depends which enum it is intended to be.
40+
Enums are usually encoded as 32-bit integers, with the meaning of each integer value depending on which enum type is being used.
4141

4242
#### `MarkupType`
4343
Name | Value
4444
----------- | -------
4545
`None` | `0x00000000`
46-
`UI` | `0x01000000`
47-
`Class` | `0x02000000`
48-
`Effect` | `0x03000000`
49-
`DataType` | `0x04000000`
50-
`DataQuery` | `0x05000000`
46+
`UI` | `0x00000001`
47+
`Class` | `0x00000002`
48+
`Effect` | `0x00000003`
49+
`DataType` | `0x00000004`
50+
`DataQuery` | `0x00000005`
5151

5252
## File structure
5353
A custom binary format is used to store all compiler output. This format is divided into several sections, and can even be split across multiple files using [shared Data Tables](#shared-data-tables).
@@ -74,11 +74,11 @@ As an example, a Dependencies section with two includes might be stored as shown
7474

7575
Start offset | Value | Meaning
7676
--------------------- | ------------- | ---------
77-
`0x00` | `0x02000000` | The list contains 2 includes
78-
`0x04` | `0x00000000` | `dependencies[0]` is compiled UIB
79-
`0x05` | `0x05000000` | The URI of the 1st dependency is the 6th string in the [Data Table](#binary-data-table)
77+
`0x00` | `0x00000002` | The list contains 2 includes
78+
`0x04` | `0x00` | `dependencies[0]` is compiled UIB
79+
`0x05` | `0x00000005` | The URI of the 1st dependency is the 6th string in the [Data Table](#binary-data-table)
8080
`0x09` | `0x01` | `dependencies[1]` is UIX XML
81-
`0x10` | `0x02000000` | The URI of the 2nd dependency is the 3rd string in the [Data Table](#binary-data-table)
81+
`0x10` | `0x00000002` | The URI of the 2nd dependency is the 3rd string in the [Data Table](#binary-data-table)
8282

8383
### Type Export Declarations
8484
The Type Export Declarations are composed of two tables: the Export Table and Alias Table.
@@ -109,15 +109,15 @@ As an example, a string table with three entries might be stored as shown below.
109109

110110
Start offset | Value | Meaning
111111
-------------- | ------------ | -----------------------------------------
112-
`-0x04` | `0x03000000` | The table contains 3 strings
113-
`0x00` | `0x0C000000` | `strings[0]` is located at offset `0x0C`
114-
`0x04` | `0x1D000000` | `strings[1]` is located at offset `0x1D`
115-
`0x08` | `0x23000000` | `strings[2]` is located at offset `0x23`
116-
`0x0C` | `0x08000000` | `strings[0]` is 8 UTF-16 characters
112+
`-0x04` | `0x00000003` | The table contains 3 strings
113+
`0x00` | `0x0000000C` | `strings[0]` is located at offset `0x0C`
114+
`0x04` | `0x0000001D` | `strings[1]` is located at offset `0x1D`
115+
`0x08` | `0x00000023` | `strings[2]` is located at offset `0x23`
116+
`0x0C` | `0x00000008` | `strings[0]` is 8 UTF-16 characters
117117
`0x0D` | `"Γεια σας"` | `strings[0]` character data
118-
`0x1D` | `0x05800000` | `strings[1]` is 5 UTF-8 characters
118+
`0x1D` | `0x00008005` | `strings[1]` is 5 UTF-8 characters
119119
`0x1E` | `"Howdy"` | `strings[1]` character data
120-
`0x23` | `0x08800000` | `strings[2]` is 8 UTF-8 characters
120+
`0x23` | `0x00008008` | `strings[2]` is 8 UTF-8 characters
121121
`0x24` | `"MOREtext"` | `strings[2]` character data
122122

123123
#### Constants Table

0 commit comments

Comments
 (0)