Update ssz/simple-serialize.md

Co-authored-by: Hsiao-Wei Wang <hwwang156@gmail.com>
This commit is contained in:
Joanne Fuller 2020-06-26 13:33:23 +10:00 committed by GitHub
parent 7f3e6564eb
commit 588fcd0a65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ We first define helper functions:
* `List[C, N]` and `Vector[C, N]`, where `C` is a composite type: `N` * `List[C, N]` and `Vector[C, N]`, where `C` is a composite type: `N`
* containers: `len(fields)` * containers: `len(fields)`
* `pack(values)`: Given ordered objects of the same basic type: * `pack(values)`: Given ordered objects of the same basic type:
1. Serialize the values into bytes. 1. Serialize `values` into bytes.
2. If not aligned to a multiple of `BYTES_PER_CHUNK` bytes, right-pad with zeroes to the next multiple. 2. If not aligned to a multiple of `BYTES_PER_CHUNK` bytes, right-pad with zeroes to the next multiple.
3. Partition the bytes into `BYTES_PER_CHUNK`-byte chunks. 3. Partition the bytes into `BYTES_PER_CHUNK`-byte chunks.
4. Return the chunks. 4. Return the chunks.