Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fa4def5

Browse filesBrowse files
committed
artype is known now
1 parent 830fec0 commit fa4def5
Copy full SHA for fa4def5

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎example/typed-arrays/README.md

Copy file name to clipboardExpand all lines: example/typed-arrays/README.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ Note that the length of `data`, and therefore the value of `YYYYYYYY_YYYYYYYY` i
5656

5757
A Float32Array containing 10 values will have a `data` size starting at 42 bytes if there is no alignment:
5858

59-
- 1 byte of `artype` = `0x??`
59+
- 1 byte of `artype` = `0x09`
6060
- 1 byte of `AAAAAAAA` = 0
6161
- 0 bytes of `align`
6262
- 40 bytes of `vals`
6363

6464
A Float32Array should be aligned on 4-byte boundaries, so there may need to be up to 3 bytes of padding.
6565
In that case, the total size of `data` woulb become so this may increase to 45 bytes:
6666

67-
- 1 byte of `artype` = `0x??`
67+
- 1 byte of `artype` = `0x09`
6868
- 1 byte of `AAAAAAAA` = 3
6969
- 3 bytes of `align`
7070
- 40 bytes of `vals`
@@ -91,7 +91,7 @@ So to put the entire example of a 10-entry Float32Array together, it would be re
9191

9292
```
9393
+--------+--------+--------+--------+--------+========+========+
94-
| 0xc7 | 0x2D | type | 0x?? | 0x03 |3 zeros | vals |
94+
| 0xc7 | 0x2D | type | 0x09 | 0x03 |3 zeros | vals |
9595
+--------+--------+--------+--------+--------+========+========+
9696
```
9797

@@ -100,7 +100,7 @@ Where:
100100
- `0xc7` is the MessagePack type for `ext 8`
101101
- `0x2D` is 45, the length of the TypedArray payload described above
102102
- `type` is the extension type number
103-
- `0x??` is the `artype` number for Float32Array
103+
- `0x09` is the `artype` number for Float32Array
104104
- `0x03` is the number of alignment bytes
105105
- 3 zeros are required for alignment
106106
- `vals` contains the actual floating-point data

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.