Skip to content

Commit e47c3ad

Browse files
committed
Fix typo and rearrange
1 parent fa4def5 commit e47c3ad

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

example/typed-arrays/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,18 @@ A Float32Array containing 10 values will have a `data` size starting at 42 bytes
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.
65-
In that case, the total size of `data` woulb become so this may increase to 45 bytes:
65+
In that case, the total size of `data` would become 45 bytes:
6666

6767
- 1 byte of `artype` = `0x09`
6868
- 1 byte of `AAAAAAAA` = 3
6969
- 3 bytes of `align`
7070
- 40 bytes of `vals`
7171

72-
Since the extension array is wrapped with its own header, there is some additional structure before this content.
72+
The exact amount of padding depends on what data has been encoded _before_ the TypedArray is encountered.
7373

74+
Since the extension array is wrapped with its own header, there is some additional structure before this content.
7475
See the [MessagePack spec for extensions](https://github.com/msgpack/msgpack/blob/master/spec.md#ext-format-family).
76+
7577
The content of a TypedArray object is inserted after the extension header.
7678
For example, an extension where the size of the encoded array is up to (2^8)-1 bytes will be laid out like this:
7779

0 commit comments

Comments
 (0)
close