whitespace

This commit is contained in:
Alex Stokes 2021-05-28 12:27:19 -07:00
parent f08cc15b8d
commit ef9b7125c2
No known key found for this signature in database
GPG Key ID: 99B3D88FD6C55A69
1 changed files with 2 additions and 2 deletions

View File

@ -175,7 +175,7 @@ return b"".join(fixed_parts + variable_parts)
A `value` as `Union[T...]` type has properties `value.value` with the contained value, and `value.selector` which indexes the selected `Union` type option `T`. A `value` as `Union[T...]` type has properties `value.value` with the contained value, and `value.selector` which indexes the selected `Union` type option `T`.
A `Union`: A `Union`:
- May have multiple selectors with the same type. - May have multiple selectors with the same type.
- Should not use selectors above 127 (i.e. highest bit is set), these are reserved for backwards compatible extensions. - Should not use selectors above 127 (i.e. highest bit is set), these are reserved for backwards compatible extensions.
- Must have at least 1 type option. - Must have at least 1 type option.
- May have `None` as first type option, i.e. `selector == 0` - May have `None` as first type option, i.e. `selector == 0`
@ -194,7 +194,7 @@ else:
## Deserialization ## Deserialization
Because serialization is an injective function (i.e. two distinct objects of the same type will serialize to different values) any bytestring has at most one object it could deserialize to. Because serialization is an injective function (i.e. two distinct objects of the same type will serialize to different values) any bytestring has at most one object it could deserialize to.
Deserialization can be implemented using a recursive algorithm. The deserialization of basic objects is easy, and from there we can find a simple recursive algorithm for all fixed-size objects. For variable-size objects we have to do one of the following depending on what kind of object it is: Deserialization can be implemented using a recursive algorithm. The deserialization of basic objects is easy, and from there we can find a simple recursive algorithm for all fixed-size objects. For variable-size objects we have to do one of the following depending on what kind of object it is: